curl -X GET "https://www.vxras.com/api/v1/qq"?qq=82719519
<?php
$url = "https://www.vxras.com/api/v1/qq";
$data = array(
"qq" => "82719519"
);
$headers = array(
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
// 使用 Fetch API
const url = "https://www.vxras.com/api/v1/qq";
const data = {
"qq": "82719519"
};
const options = {
method: "GET",
headers: {
},
body: JSON.stringify(data),
};
fetch(url, options)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
# 使用 requests 库
import requests
url = "https://www.vxras.com/api/v1/qq"
data = {
"qq": "82719519"
}
headers = {
}
response = requests.post(url, data=data, headers=headers)
print(response.json())
暂无评论内容