Servers
https://httpstat.us/
Default
ID: get200
Get 200
GET
200Example of a response with a 200 status code.
Responses
Successful responseSchema JSON JSON
application/json
"200 OK"
GET
200Samples
get {
url: https://httpstat.us/200
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/200
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/200' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/200', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/200';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/200'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get201
Get 201
GET
201Example of a response with a 201 status code.
Responses
CreatedSchema JSON JSON
application/json
"201 Created"
GET
201Samples
get {
url: https://httpstat.us/201
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/201
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/201' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/201', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/201';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/201'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get400
Get 400
GET
400Example of a response with a 400 status code.
Responses
Bad RequestSchema JSON JSON
application/json
"400 Bad Request"
GET
400Samples
get {
url: https://httpstat.us/400
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/400
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/400' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/400', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/400';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/400'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get401
Get 401
GET
401Example of a response with a 401 status code.
Responses
UnauthorizedSchema JSON JSON
application/json
"401 Unauthorized"
GET
401Samples
get {
url: https://httpstat.us/401
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/401
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/401' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/401', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/401';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/401'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get403
Get 403
GET
403Example of a response with a 403 status code.
Responses
ForbiddenSchema JSON JSON
application/json
"403 Forbidden"
GET
403Samples
get {
url: https://httpstat.us/403
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/403
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/403' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/403', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/403';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/403'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get404
Get 404
GET
404Example of a response with a 404 status code.
Responses
Not FoundSchema JSON JSON
application/json
"404 Not Found"
GET
404Samples
get {
url: https://httpstat.us/404
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/404
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/404' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/404', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/404';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/404'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())
ID: get500
Get 500
GET
500Example of a response with a 500 status code.
Responses
Internal Server ErrorSchema JSON JSON
application/json
"500 Internal Server Error"
GET
500Samples
get {
url: https://httpstat.us/500
}
headers {
Content-Type: application/json
}
get {
url: https://httpstat.us/500
}
headers {
Content-Type: application/json
}
curl -X GET \
'https://httpstat.us/500' \
-H "Content-Type: application/json"
fetch('https://httpstat.us/500', {headers:{'Content-Type':'application/json'}})
.then(response => response.json())
.then(data => console.log(data));
<?php
$url = 'https://httpstat.us/500';
$method = 'GET';
$headers = [
'Content-Type' => 'application/json',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = 'https://httpstat.us/500'
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.json())