curl -X POST https://api.example.com/v1/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'
import requests
response = requests.post(
"https://api.example.com/v1/check",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"url": "https://example.com"}
)
print(response.json())
$ch = curl_init("https://api.example.com/v1/check");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode(["url" => "https://example.com"]),
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);