随机一言
/api/v1/zyyiyan
curl -X \
'https://apis.52oqq.cn/api/v1/zyyiyan' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json'
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://apis.52oqq.cn/api/v1/zyyiyan');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
import requests
url = 'https://apis.52oqq.cn/api/v1/zyyiyan'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.(url, headers=headers)
data = response.json()
fetch('https://apis.52oqq.cn/api/v1/zyyiyan', {
method: '',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
})
.then(res => res.json())
.then(data => console.log(data));