curl -X POST {{ apiBaseUrl }}/api/buy/api_purchase/ \
-H "Content-Type: application/json" \
-d '{{ getApiExample("curl") }}'
fetch('{{ apiBaseUrl }}/api/buy/api_purchase/', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({{ getApiExample("javascript") }})
})
.then(response => response.json())
.then(data => console.log(data));
import requests
import json
data = {{ getApiExample("python") }}
response = requests.post(
"{{ apiBaseUrl }}/api/buy/api_purchase/",
json=data
)
print(response.json())
$data = {{ getApiExample("php") }};
$options = [
'http' => [
'header' => "Content-Type: application/json",
'method' => 'POST',
'content' => json_encode($data)
]
];
$context = stream_context_create($options);
$result = file_get_contents('{{ apiBaseUrl }}/api/buy/api_purchase/', false, $context);
echo $result;
{{ JSON.stringify(apiTestResult.data, null, 2) }}
加载评论中...
暂无评价,快来成为第一个评价的人吧!