cURL 复制
curl -X POST "https://cx4.cn/openApi/finance/tax" -H "X-Api-Key: 你的SecretKey" -d "monthly=15000&social=1500&special=2000&other=0&threshold=5000&month=6&action=month"
JavaScript 复制
fetch('https://cx4.cn/openApi/finance/tax', {
method: 'POST',
headers: {
'X-Api-Key': '你的SecretKey',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: 'monthly=15000&social=1500&special=2000&other=0&threshold=5000&month=6&action=month'
})
.then(res => res.json())
.then(data => console.log(data));
PHP 复制
post('https://cx4.cn/openApi/finance/tax', [
'headers' => ['X-Api-Key' => '你的SecretKey'],
'form_params' => ['monthly' => '15000', 'social' => '1500', 'special' => '2000', 'other' => '0', 'threshold' => '5000', 'month' => '6', 'action' => 'month'],
]);
echo $response->getBody();
Java 复制
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://cx4.cn/openApi/finance/tax"))
.header("X-Api-Key", "你的SecretKey")
.header("Content-Type", "application/x-www-form-urlencoded")
.POST(HttpRequest.BodyPublishers.ofString("monthly=15000&social=1500&special=2000&other=0&threshold=5000&month=6&action=month"))
.build();
HttpResponse response = client.send(
request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Python 复制
import requests
res = requests.post('https://cx4.cn/openApi/finance/tax',
headers={'X-Api-Key': '你的SecretKey'},
data={'monthly': '15000', 'social': '1500', 'special': '2000', 'other': '0', 'threshold': '5000', 'month': '6', 'action': 'month'})
print(res.json())