Mock HTTP API

v2.0.0

A simple HTTP server that can be used to mock HTTP responses for testing purposes. Inspired by httpbin and built using nodejs and fastify with the idea of running it via https://mockhttp.org, via docker jaredwray/mockhttp, or nodejs npm install @jaredwray/mockhttp.

About mockhttp.org

mockhttp.org is a free hosted instance of this codebase for testing. It runs on a Cloudflare Worker (no containers): documentation is served from Workers Assets, and mock APIs such as /get and /post run in the Worker. The service is globally available and rate-limited (1000 requests per minute per IP) to prevent abuse.

Server

HTTP Methods

GET /get

Returns request information for GET requests

Responses
200 Default Response
method string
headers object
queryParams object
{
  "method": "string",
  "headers": {},
  "queryParams": {}
}
curl -X GET "/get"
const response = await fetch('/get', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/get')
data = response.json()
Test Request
GET
/get
POST /post

Handles a POST request and returns request information

Request Body application/json
{
  "key": "value"
}
Responses
200 Default Response
method string
headers object
body object
{
  "method": "string",
  "headers": {},
  "body": {
    "key": "value"
  }
}
curl -X POST "/post" \
  -H "Content-Type: application/json" \
  -d '{  "key": "value"}'
const response = await fetch('/post', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({  "key": "value"})
});
const data = await response.json();
import requests

response = requests.post(
    '/post',
    headers={
        'Content-Type': 'application/json'
    },
    json={  "key": "value"}
)
data = response.json()
Test Request
POST
/post
DELETE /delete

Handles a DELETE request and returns request information

Responses
200 Default Response
method string
headers object
body oneOf
{
  "method": "string",
  "headers": {},
  "body": null
}
curl -X DELETE "/delete"
const response = await fetch('/delete', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/delete')
data = response.json()
Test Request
DELETE
/delete
PUT /put

Handles a PUT request and returns request information

Request Body application/json
{
  "key": "value"
}
Responses
200 Default Response
method string
headers object
body object
{
  "method": "string",
  "headers": {},
  "body": {
    "key": "value"
  }
}
curl -X PUT "/put" \
  -H "Content-Type: application/json" \
  -d '{  "key": "value"}'
const response = await fetch('/put', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({  "key": "value"})
});
const data = await response.json();
import requests

response = requests.put(
    '/put',
    headers={
        'Content-Type': 'application/json'
    },
    json={  "key": "value"}
)
data = response.json()
Test Request
PUT
/put
PATCH /patch

Handles a PATCH request and returns request information

Request Body application/json
{
  "key": "value"
}
Responses
200 Default Response
method string
headers object
body object
{
  "method": "string",
  "headers": {},
  "body": {
    "key": "value"
  }
}
curl -X PATCH "/patch" \
  -H "Content-Type: application/json" \
  -d '{  "key": "value"}'
const response = await fetch('/patch', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({  "key": "value"})
});
const data = await response.json();
import requests

response = requests.patch(
    '/patch',
    headers={
        'Content-Type': 'application/json'
    },
    json={  "key": "value"}
)
data = response.json()
Test Request
PATCH
/patch

Status Codes

GET /status/{code}?

Return status code or random status code if more than one are given

Parameters
Name Type In Description
code * string path HTTP status code to be returned
Responses
200 Default Response
status string
{
  "status": "string"
}
curl -X GET "/status/{code}?"
const response = await fetch('/status/{code}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/status/{code}?')
data = response.json()
Test Request
GET
/status/{code}?
code path *
POST /status/{code}?

Return status code or random status code if more than one are given

Parameters
Name Type In Description
code * string path HTTP status code to be returned
Responses
200 Default Response
status string
{
  "status": "string"
}
curl -X POST "/status/{code}?"
const response = await fetch('/status/{code}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/status/{code}?')
data = response.json()
Test Request
POST
/status/{code}?
code path *
PUT /status/{code}?

Return status code or random status code if more than one are given

Parameters
Name Type In Description
code * string path HTTP status code to be returned
Responses
200 Default Response
status string
{
  "status": "string"
}
curl -X PUT "/status/{code}?"
const response = await fetch('/status/{code}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/status/{code}?')
data = response.json()
Test Request
PUT
/status/{code}?
code path *
DELETE /status/{code}?

Return status code or random status code if more than one are given

Parameters
Name Type In Description
code * string path HTTP status code to be returned
Responses
200 Default Response
status string
{
  "status": "string"
}
curl -X DELETE "/status/{code}?"
const response = await fetch('/status/{code}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/status/{code}?')
data = response.json()
Test Request
DELETE
/status/{code}?
code path *
PATCH /status/{code}?

Return status code or random status code if more than one are given

Parameters
Name Type In Description
code * string path HTTP status code to be returned
Responses
200 Default Response
status string
{
  "status": "string"
}
curl -X PATCH "/status/{code}?"
const response = await fetch('/status/{code}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/status/{code}?')
data = response.json()
Test Request
PATCH
/status/{code}?
code path *

Request Inspection

GET /ip

Returns the IP address of the client

Responses
200 Default Response
ip string The IP address of the client
{
  "ip": "string"
}
curl -X GET "/ip"
const response = await fetch('/ip', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/ip')
data = response.json()
Test Request
GET
/ip
GET /headers

Returns all headers of the client request

Responses
200 Default Response
headers object All headers of the client request
{
  "headers": {}
}
curl -X GET "/headers"
const response = await fetch('/headers', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/headers')
data = response.json()
Test Request
GET
/headers
GET /user-agent

Returns the User-Agent header of the client request

Responses
200 Default Response
userAgent string The User-Agent header of the client request
{
  "userAgent": "string"
}
curl -X GET "/user-agent"
const response = await fetch('/user-agent', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/user-agent')
data = response.json()
Test Request
GET
/user-agent

Response Inspection

GET /cache

Handles cache validation and retrieval.

Responses
200 The cached content or resource.
(value) string The cached content or resource.
"string"
304 Indicates the resource has not been modified.
curl -X GET "/cache"
const response = await fetch('/cache', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/cache')
data = response.json()
Test Request
GET
/cache
GET /cache/{value}

Sets a Cache-Control header for n seconds.

Parameters
Name Type In Description
value * integer path Number of seconds to cache the resource.
Responses
200 Confirmation message for setting cache.
(value) string Confirmation message for setting cache.
"string"
curl -X GET "/cache/{value}"
const response = await fetch('/cache/{value}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/cache/{value}')
data = response.json()
Test Request
GET
/cache/{value}
value path *
GET /etag/{etag}

Handles ETag-based conditional requests.

Parameters
Name Type In Description
etag * string path The ETag value for the resource.
Responses
200 Resource content for matching ETag.
(value) string Resource content for matching ETag.
"string"
304 Indicates the resource has not been modified.
412 Indicates a precondition failed due to mismatched ETag.
curl -X GET "/etag/{etag}"
const response = await fetch('/etag/{etag}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/etag/{etag}')
data = response.json()
Test Request
GET
/etag/{etag}
etag path *
GET /response-headers

Returns a set of response headers based on the query string.

Parameters
Name Type In Description
type object query
additionalProperties object query
description object query
Responses
200 Response headers as per query string parameters.
{
  "key": "value"
}
curl -X GET "/response-headers?type={type}&additionalProperties={additionalProperties}&description={description}"
const response = await fetch('/response-headers?type={type}&additionalProperties={additionalProperties}&description={description}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/response-headers',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}',
    'description': '{description}'
    }
)
data = response.json()
Test Request
GET
/response-headers
type query
additionalProperties query
description query
POST /response-headers

Returns a set of response headers based on the query string.

Parameters
Name Type In Description
type object query
additionalProperties object query
description object query
Responses
200 Response headers as per query string parameters.
{
  "key": "value"
}
curl -X POST "/response-headers?type={type}&additionalProperties={additionalProperties}&description={description}"
const response = await fetch('/response-headers?type={type}&additionalProperties={additionalProperties}&description={description}', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post(
    '/response-headers',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}',
    'description': '{description}'
    }
)
data = response.json()
Test Request
POST
/response-headers
type query
additionalProperties query
description query

Response Formats

GET /plain/{index}?

Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Plain text content
(value) string Plain text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X GET "/plain/{index}?"
const response = await fetch('/plain/{index}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/plain/{index}?')
data = response.json()
Test Request
GET
/plain/{index}?
index path *
POST /plain/{index}?

Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Plain text content
(value) string Plain text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X POST "/plain/{index}?"
const response = await fetch('/plain/{index}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/plain/{index}?')
data = response.json()
Test Request
POST
/plain/{index}?
index path *
PUT /plain/{index}?

Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Plain text content
(value) string Plain text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PUT "/plain/{index}?"
const response = await fetch('/plain/{index}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/plain/{index}?')
data = response.json()
Test Request
PUT
/plain/{index}?
index path *
DELETE /plain/{index}?

Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Plain text content
(value) string Plain text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X DELETE "/plain/{index}?"
const response = await fetch('/plain/{index}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/plain/{index}?')
data = response.json()
Test Request
DELETE
/plain/{index}?
index path *
PATCH /plain/{index}?

Returns plain text content. A random template is selected unless a 1-based template index is provided (e.g. /plain/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Plain text content
(value) string Plain text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PATCH "/plain/{index}?"
const response = await fetch('/plain/{index}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/plain/{index}?')
data = response.json()
Test Request
PATCH
/plain/{index}?
index path *
GET /text/{index}?

Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Text content
(value) string Text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X GET "/text/{index}?"
const response = await fetch('/text/{index}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/text/{index}?')
data = response.json()
Test Request
GET
/text/{index}?
index path *
POST /text/{index}?

Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Text content
(value) string Text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X POST "/text/{index}?"
const response = await fetch('/text/{index}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/text/{index}?')
data = response.json()
Test Request
POST
/text/{index}?
index path *
PUT /text/{index}?

Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Text content
(value) string Text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PUT "/text/{index}?"
const response = await fetch('/text/{index}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/text/{index}?')
data = response.json()
Test Request
PUT
/text/{index}?
index path *
DELETE /text/{index}?

Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Text content
(value) string Text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X DELETE "/text/{index}?"
const response = await fetch('/text/{index}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/text/{index}?')
data = response.json()
Test Request
DELETE
/text/{index}?
index path *
PATCH /text/{index}?

Returns text content. A random template is selected unless a 1-based template index is provided (e.g. /text/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 Text content
(value) string Text content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PATCH "/text/{index}?"
const response = await fetch('/text/{index}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/text/{index}?')
data = response.json()
Test Request
PATCH
/text/{index}?
index path *
GET /html/{index}?

Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 HTML content
(value) string HTML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X GET "/html/{index}?"
const response = await fetch('/html/{index}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/html/{index}?')
data = response.json()
Test Request
GET
/html/{index}?
index path *
POST /html/{index}?

Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 HTML content
(value) string HTML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X POST "/html/{index}?"
const response = await fetch('/html/{index}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/html/{index}?')
data = response.json()
Test Request
POST
/html/{index}?
index path *
PUT /html/{index}?

Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 HTML content
(value) string HTML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PUT "/html/{index}?"
const response = await fetch('/html/{index}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/html/{index}?')
data = response.json()
Test Request
PUT
/html/{index}?
index path *
DELETE /html/{index}?

Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 HTML content
(value) string HTML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X DELETE "/html/{index}?"
const response = await fetch('/html/{index}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/html/{index}?')
data = response.json()
Test Request
DELETE
/html/{index}?
index path *
PATCH /html/{index}?

Returns HTML content. A random template is selected unless a 1-based template index is provided (e.g. /html/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 HTML content
(value) string HTML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PATCH "/html/{index}?"
const response = await fetch('/html/{index}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/html/{index}?')
data = response.json()
Test Request
PATCH
/html/{index}?
index path *
GET /xml/{index}?

Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 XML content
(value) string XML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X GET "/xml/{index}?"
const response = await fetch('/xml/{index}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/xml/{index}?')
data = response.json()
Test Request
GET
/xml/{index}?
index path *
POST /xml/{index}?

Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 XML content
(value) string XML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X POST "/xml/{index}?"
const response = await fetch('/xml/{index}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/xml/{index}?')
data = response.json()
Test Request
POST
/xml/{index}?
index path *
PUT /xml/{index}?

Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 XML content
(value) string XML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PUT "/xml/{index}?"
const response = await fetch('/xml/{index}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/xml/{index}?')
data = response.json()
Test Request
PUT
/xml/{index}?
index path *
DELETE /xml/{index}?

Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 XML content
(value) string XML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X DELETE "/xml/{index}?"
const response = await fetch('/xml/{index}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/xml/{index}?')
data = response.json()
Test Request
DELETE
/xml/{index}?
index path *
PATCH /xml/{index}?

Returns XML content. A random template is selected unless a 1-based template index is provided (e.g. /xml/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 XML content
(value) string XML content
"string"
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PATCH "/xml/{index}?"
const response = await fetch('/xml/{index}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/xml/{index}?')
data = response.json()
Test Request
PATCH
/xml/{index}?
index path *
GET /json/{index}?

Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 JSON content
{
  "key": "value"
}
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X GET "/json/{index}?"
const response = await fetch('/json/{index}?', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/json/{index}?')
data = response.json()
Test Request
GET
/json/{index}?
index path *
POST /json/{index}?

Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 JSON content
{
  "key": "value"
}
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X POST "/json/{index}?"
const response = await fetch('/json/{index}?', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/json/{index}?')
data = response.json()
Test Request
POST
/json/{index}?
index path *
PUT /json/{index}?

Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 JSON content
{
  "key": "value"
}
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PUT "/json/{index}?"
const response = await fetch('/json/{index}?', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/json/{index}?')
data = response.json()
Test Request
PUT
/json/{index}?
index path *
DELETE /json/{index}?

Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 JSON content
{
  "key": "value"
}
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X DELETE "/json/{index}?"
const response = await fetch('/json/{index}?', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/json/{index}?')
data = response.json()
Test Request
DELETE
/json/{index}?
index path *
PATCH /json/{index}?

Returns JSON content. A random template is selected unless a 1-based template index is provided (e.g. /json/1) for stable output.

Parameters
Name Type In Description
index * string path Optional 1-based template index for stable, repeatable output. Omit for a random template.
Responses
200 JSON content
{
  "key": "value"
}
404 The requested template index does not exist
error string
{
  "error": "string"
}
curl -X PATCH "/json/{index}?"
const response = await fetch('/json/{index}?', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/json/{index}?')
data = response.json()
Test Request
PATCH
/json/{index}?
index path *
GET /deny

Returns page denied by robots.txt rules

Responses
403 Page denied by robots.txt rules
(value) string Page denied by robots.txt rules
"string"
curl -X GET "/deny"
const response = await fetch('/deny', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/deny')
data = response.json()
Test Request
GET
/deny
POST /deny

Returns page denied by robots.txt rules

Responses
403 Page denied by robots.txt rules
(value) string Page denied by robots.txt rules
"string"
curl -X POST "/deny"
const response = await fetch('/deny', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/deny')
data = response.json()
Test Request
POST
/deny
PUT /deny

Returns page denied by robots.txt rules

Responses
403 Page denied by robots.txt rules
(value) string Page denied by robots.txt rules
"string"
curl -X PUT "/deny"
const response = await fetch('/deny', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/deny')
data = response.json()
Test Request
PUT
/deny
DELETE /deny

Returns page denied by robots.txt rules

Responses
403 Page denied by robots.txt rules
(value) string Page denied by robots.txt rules
"string"
curl -X DELETE "/deny"
const response = await fetch('/deny', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/deny')
data = response.json()
Test Request
DELETE
/deny
PATCH /deny

Returns page denied by robots.txt rules

Responses
403 Page denied by robots.txt rules
(value) string Page denied by robots.txt rules
"string"
curl -X PATCH "/deny"
const response = await fetch('/deny', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/deny')
data = response.json()
Test Request
PATCH
/deny
GET /gzip

Returns GZip-encoded data

Responses
200 GZip-encoded content
(value) string GZip-encoded content
"string"
curl -X GET "/gzip"
const response = await fetch('/gzip', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/gzip')
data = response.json()
Test Request
GET
/gzip
POST /gzip

Returns GZip-encoded data

Responses
200 GZip-encoded content
(value) string GZip-encoded content
"string"
curl -X POST "/gzip"
const response = await fetch('/gzip', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/gzip')
data = response.json()
Test Request
POST
/gzip
PUT /gzip

Returns GZip-encoded data

Responses
200 GZip-encoded content
(value) string GZip-encoded content
"string"
curl -X PUT "/gzip"
const response = await fetch('/gzip', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/gzip')
data = response.json()
Test Request
PUT
/gzip
DELETE /gzip

Returns GZip-encoded data

Responses
200 GZip-encoded content
(value) string GZip-encoded content
"string"
curl -X DELETE "/gzip"
const response = await fetch('/gzip', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/gzip')
data = response.json()
Test Request
DELETE
/gzip
PATCH /gzip

Returns GZip-encoded data

Responses
200 GZip-encoded content
(value) string GZip-encoded content
"string"
curl -X PATCH "/gzip"
const response = await fetch('/gzip', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/gzip')
data = response.json()
Test Request
PATCH
/gzip
GET /deflate

Returns Deflate-encoded data

Responses
200 Deflate-encoded content
(value) string Deflate-encoded content
"string"
curl -X GET "/deflate"
const response = await fetch('/deflate', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/deflate')
data = response.json()
Test Request
GET
/deflate
POST /deflate

Returns Deflate-encoded data

Responses
200 Deflate-encoded content
(value) string Deflate-encoded content
"string"
curl -X POST "/deflate"
const response = await fetch('/deflate', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/deflate')
data = response.json()
Test Request
POST
/deflate
PUT /deflate

Returns Deflate-encoded data

Responses
200 Deflate-encoded content
(value) string Deflate-encoded content
"string"
curl -X PUT "/deflate"
const response = await fetch('/deflate', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/deflate')
data = response.json()
Test Request
PUT
/deflate
DELETE /deflate

Returns Deflate-encoded data

Responses
200 Deflate-encoded content
(value) string Deflate-encoded content
"string"
curl -X DELETE "/deflate"
const response = await fetch('/deflate', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/deflate')
data = response.json()
Test Request
DELETE
/deflate
PATCH /deflate

Returns Deflate-encoded data

Responses
200 Deflate-encoded content
(value) string Deflate-encoded content
"string"
curl -X PATCH "/deflate"
const response = await fetch('/deflate', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/deflate')
data = response.json()
Test Request
PATCH
/deflate
GET /brotli

Returns Brotli-encoded data

Responses
200 Brotli-encoded content
(value) string Brotli-encoded content
"string"
curl -X GET "/brotli"
const response = await fetch('/brotli', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/brotli')
data = response.json()
Test Request
GET
/brotli
POST /brotli

Returns Brotli-encoded data

Responses
200 Brotli-encoded content
(value) string Brotli-encoded content
"string"
curl -X POST "/brotli"
const response = await fetch('/brotli', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/brotli')
data = response.json()
Test Request
POST
/brotli
PUT /brotli

Returns Brotli-encoded data

Responses
200 Brotli-encoded content
(value) string Brotli-encoded content
"string"
curl -X PUT "/brotli"
const response = await fetch('/brotli', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/brotli')
data = response.json()
Test Request
PUT
/brotli
DELETE /brotli

Returns Brotli-encoded data

Responses
200 Brotli-encoded content
(value) string Brotli-encoded content
"string"
curl -X DELETE "/brotli"
const response = await fetch('/brotli', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/brotli')
data = response.json()
Test Request
DELETE
/brotli
PATCH /brotli

Returns Brotli-encoded data

Responses
200 Brotli-encoded content
(value) string Brotli-encoded content
"string"
curl -X PATCH "/brotli"
const response = await fetch('/brotli', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/brotli')
data = response.json()
Test Request
PATCH
/brotli

Redirects

GET /absolute-redirect/{value}

Redirects the request to the target URL using an absolute URL

Parameters
Name Type In Description
value * integer path
host * string header
Responses
302 Default Response
(value) string
"string"
curl -X GET "/absolute-redirect/{value}" \
  -H "host: {host}"
const response = await fetch('/absolute-redirect/{value}', {
  method: 'GET',
  headers: {
    'host': '{host}'
  }
});
const data = await response.json();
import requests

response = requests.get(
    '/absolute-redirect/{value}',
    headers={
        'host': '{host}'
    }
)
data = response.json()
Test Request
GET
/absolute-redirect/{value}
value path *
host header *
GET /relative-redirect/{value}

Redirects the request to the target URL using an relative URL

Parameters
Name Type In Description
value * integer path
host * string header
Responses
302 Default Response
(value) string
"string"
curl -X GET "/relative-redirect/{value}" \
  -H "host: {host}"
const response = await fetch('/relative-redirect/{value}', {
  method: 'GET',
  headers: {
    'host': '{host}'
  }
});
const data = await response.json();
import requests

response = requests.get(
    '/relative-redirect/{value}',
    headers={
        'host': '{host}'
    }
)
data = response.json()
Test Request
GET
/relative-redirect/{value}
value path *
host header *
GET /redirect-to

Redirects the request to the target URL

Parameters
Name Type In Description
url * string (uri) query The URL to redirect to
status_code string query The HTTP status code to use for redirection
Responses
200 Default Response
curl -X GET "/redirect-to?url={url}&status_code={status_code}"
const response = await fetch('/redirect-to?url={url}&status_code={status_code}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/redirect-to',
    params={
    'url': '{url}',
    'status_code': '{status_code}'
    }
)
data = response.json()
Test Request
GET
/redirect-to
url query *
status_code query
POST /redirect-to

Redirects the request to the target URL

Parameters
Name Type In Description
url * string (uri) query The URL to redirect to
status_code string query The HTTP status code to use for redirection
Responses
200 Default Response
curl -X POST "/redirect-to?url={url}&status_code={status_code}"
const response = await fetch('/redirect-to?url={url}&status_code={status_code}', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post(
    '/redirect-to',
    params={
    'url': '{url}',
    'status_code': '{status_code}'
    }
)
data = response.json()
Test Request
POST
/redirect-to
url query *
status_code query
PUT /redirect-to

Redirects the request to the target URL

Parameters
Name Type In Description
url * string (uri) query The URL to redirect to
status_code string query The HTTP status code to use for redirection
Responses
200 Default Response
curl -X PUT "/redirect-to?url={url}&status_code={status_code}"
const response = await fetch('/redirect-to?url={url}&status_code={status_code}', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put(
    '/redirect-to',
    params={
    'url': '{url}',
    'status_code': '{status_code}'
    }
)
data = response.json()
Test Request
PUT
/redirect-to
url query *
status_code query
DELETE /redirect-to

Redirects the request to the target URL

Parameters
Name Type In Description
url * string (uri) query The URL to redirect to
status_code string query The HTTP status code to use for redirection
Responses
200 Default Response
curl -X DELETE "/redirect-to?url={url}&status_code={status_code}"
const response = await fetch('/redirect-to?url={url}&status_code={status_code}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete(
    '/redirect-to',
    params={
    'url': '{url}',
    'status_code': '{status_code}'
    }
)
data = response.json()
Test Request
DELETE
/redirect-to
url query *
status_code query
PATCH /redirect-to

Redirects the request to the target URL

Parameters
Name Type In Description
url * string (uri) query The URL to redirect to
status_code string query The HTTP status code to use for redirection
Responses
200 Default Response
curl -X PATCH "/redirect-to?url={url}&status_code={status_code}"
const response = await fetch('/redirect-to?url={url}&status_code={status_code}', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch(
    '/redirect-to',
    params={
    'url': '{url}',
    'status_code': '{status_code}'
    }
)
data = response.json()
Test Request
PATCH
/redirect-to
url query *
status_code query

Cookies

GET /cookies

Return cookies from the request

Responses
200 Default Response
cookies object
{
  "cookies": {}
}
curl -X GET "/cookies"
const response = await fetch('/cookies', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/cookies')
data = response.json()
Test Request
GET
/cookies
POST /cookies

Set a cookie

Request Body application/json
name* string
value* string
expires string (date-time)
{
  "name": "string",
  "value": "string",
  "expires": "string"
}
Responses
200 Default Response
cookies object
{
  "cookies": {}
}
curl -X POST "/cookies" \
  -H "Content-Type: application/json" \
  -d '{  "name": "string",  "value": "string",  "expires": "string"}'
const response = await fetch('/cookies', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({  "name": "string",  "value": "string",  "expires": "string"})
});
const data = await response.json();
import requests

response = requests.post(
    '/cookies',
    headers={
        'Content-Type': 'application/json'
    },
    json={  "name": "string",  "value": "string",  "expires": "string"}
)
data = response.json()
Test Request
POST
/cookies
DELETE /cookies

Delete a cookie

Parameters
Name Type In Description
name * string query
Responses
204 Default Response
curl -X DELETE "/cookies?name={name}"
const response = await fetch('/cookies?name={name}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete(
    '/cookies',
    params={
    'name': '{name}'
    }
)
data = response.json()
Test Request
DELETE
/cookies
name query *

Anything

GET /anything

Will return anything that you send it

Responses
200 Default Response
args object Route parameters
data object Request body data
files object Uploaded files
form object Form data
headers object Request headers
json object Parsed JSON body
method string HTTP method used
origin string Origin of the request
url string Request URL
{
  "args": {
    "key": "value"
  },
  "data": {
    "key": "value"
  },
  "files": {
    "key": "value"
  },
  "form": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "json": {
    "key": "value"
  },
  "method": "string",
  "origin": "string",
  "url": "string"
}
curl -X GET "/anything"
const response = await fetch('/anything', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/anything')
data = response.json()
Test Request
GET
/anything
POST /anything

Will return anything that you send it

Responses
200 Default Response
args object Route parameters
data object Request body data
files object Uploaded files
form object Form data
headers object Request headers
json object Parsed JSON body
method string HTTP method used
origin string Origin of the request
url string Request URL
{
  "args": {
    "key": "value"
  },
  "data": {
    "key": "value"
  },
  "files": {
    "key": "value"
  },
  "form": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "json": {
    "key": "value"
  },
  "method": "string",
  "origin": "string",
  "url": "string"
}
curl -X POST "/anything"
const response = await fetch('/anything', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/anything')
data = response.json()
Test Request
POST
/anything
PUT /anything

Will return anything that you send it

Responses
200 Default Response
args object Route parameters
data object Request body data
files object Uploaded files
form object Form data
headers object Request headers
json object Parsed JSON body
method string HTTP method used
origin string Origin of the request
url string Request URL
{
  "args": {
    "key": "value"
  },
  "data": {
    "key": "value"
  },
  "files": {
    "key": "value"
  },
  "form": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "json": {
    "key": "value"
  },
  "method": "string",
  "origin": "string",
  "url": "string"
}
curl -X PUT "/anything"
const response = await fetch('/anything', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/anything')
data = response.json()
Test Request
PUT
/anything
DELETE /anything

Will return anything that you send it

Responses
200 Default Response
args object Route parameters
data object Request body data
files object Uploaded files
form object Form data
headers object Request headers
json object Parsed JSON body
method string HTTP method used
origin string Origin of the request
url string Request URL
{
  "args": {
    "key": "value"
  },
  "data": {
    "key": "value"
  },
  "files": {
    "key": "value"
  },
  "form": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "json": {
    "key": "value"
  },
  "method": "string",
  "origin": "string",
  "url": "string"
}
curl -X DELETE "/anything"
const response = await fetch('/anything', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/anything')
data = response.json()
Test Request
DELETE
/anything
PATCH /anything

Will return anything that you send it

Responses
200 Default Response
args object Route parameters
data object Request body data
files object Uploaded files
form object Form data
headers object Request headers
json object Parsed JSON body
method string HTTP method used
origin string Origin of the request
url string Request URL
{
  "args": {
    "key": "value"
  },
  "data": {
    "key": "value"
  },
  "files": {
    "key": "value"
  },
  "form": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "json": {
    "key": "value"
  },
  "method": "string",
  "origin": "string",
  "url": "string"
}
curl -X PATCH "/anything"
const response = await fetch('/anything', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/anything')
data = response.json()
Test Request
PATCH
/anything

Auth

GET /basic-auth/{user}/{passwd}

HTTP Basic authentication. Succeeds only if the user/pass provided in the path matches the Basic Authorization header.

Parameters
Name Type In Description
user * string path
passwd * string path
Responses
200 Default Response
authenticated boolean
user string
{
  "authenticated": true,
  "user": "string"
}
401 Default Response
message string
{
  "message": "string"
}
curl -X GET "/basic-auth/{user}/{passwd}"
const response = await fetch('/basic-auth/{user}/{passwd}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/basic-auth/{user}/{passwd}')
data = response.json()
Test Request
GET
/basic-auth/{user}/{passwd}
user path *
passwd path *
GET /bearer

HTTP Bearer authentication. Succeeds if any Bearer token is present unless ?required=true is provided.

Parameters
Name Type In Description
required boolean query
Responses
200 Default Response
authenticated boolean
token string
{
  "authenticated": true,
  "token": "string"
}
401 Default Response
message string
{
  "message": "string"
}
curl -X GET "/bearer?required={required}"
const response = await fetch('/bearer?required={required}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/bearer',
    params={
    'required': '{required}'
    }
)
data = response.json()
Test Request
GET
/bearer
required query
GET /digest-auth/{qop}/{user}/{passwd}

HTTP Digest authentication. Mirrors httpbin behavior for testing clients.

Parameters
Name Type In Description
qop * string path
user * string path
passwd * string path
algorithm * string path
stale_after * string path
Responses
200 Default Response
curl -X GET "/digest-auth/{qop}/{user}/{passwd}"
const response = await fetch('/digest-auth/{qop}/{user}/{passwd}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/digest-auth/{qop}/{user}/{passwd}')
data = response.json()
Test Request
GET
/digest-auth/{qop}/{user}/{passwd}
qop path *
user path *
passwd path *
algorithm path *
stale_after path *
GET /digest-auth/{qop}/{user}/{passwd}/{algorithm}

HTTP Digest authentication. Mirrors httpbin behavior for testing clients.

Parameters
Name Type In Description
qop * string path
user * string path
passwd * string path
algorithm * string path
stale_after * string path
Responses
200 Default Response
curl -X GET "/digest-auth/{qop}/{user}/{passwd}/{algorithm}"
const response = await fetch('/digest-auth/{qop}/{user}/{passwd}/{algorithm}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/digest-auth/{qop}/{user}/{passwd}/{algorithm}')
data = response.json()
Test Request
GET
/digest-auth/{qop}/{user}/{passwd}/{algorithm}
qop path *
user path *
passwd path *
algorithm path *
stale_after path *

Images

GET /image

Returns an image based on Accept header (supports jpeg, png, svg, webp)

Parameters
Name Type In Description
accept string header Accept header for content negotiation
Responses
200 Image file
(value) string Image file
"string"
curl -X GET "/image" \
  -H "accept: {accept}"
const response = await fetch('/image', {
  method: 'GET',
  headers: {
    'accept': '{accept}'
  }
});
const data = await response.json();
import requests

response = requests.get(
    '/image',
    headers={
        'accept': '{accept}'
    }
)
data = response.json()
Test Request
GET
/image
accept header
GET /image/jpeg

Returns a JPEG image

Responses
200 JPEG image
(value) string JPEG image
"string"
curl -X GET "/image/jpeg"
const response = await fetch('/image/jpeg', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/image/jpeg')
data = response.json()
Test Request
GET
/image/jpeg
GET /image/png

Returns a PNG image

Responses
200 PNG image
(value) string PNG image
"string"
curl -X GET "/image/png"
const response = await fetch('/image/png', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/image/png')
data = response.json()
Test Request
GET
/image/png
GET /image/svg

Returns an SVG image

Responses
200 SVG image
(value) string SVG image
"string"
curl -X GET "/image/svg"
const response = await fetch('/image/svg', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/image/svg')
data = response.json()
Test Request
GET
/image/svg
GET /image/webp

Returns a WEBP image

Responses
200 WEBP image
(value) string WEBP image
"string"
curl -X GET "/image/webp"
const response = await fetch('/image/webp', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/image/webp')
data = response.json()
Test Request
GET
/image/webp

Dynamic Data

GET /uuid

Return a UUID4

Responses
200 Default Response
uuid string (uuid)
{
  "uuid": "string"
}
curl -X GET "/uuid"
const response = await fetch('/uuid', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/uuid')
data = response.json()
Test Request
GET
/uuid
GET /bytes/{n}

Returns n random bytes generated with given seed

Parameters
Name Type In Description
seed string query Seed for random number generation
n * string path Number of bytes to generate
Responses
200 Random binary data
(value) string Random binary data
"string"
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/bytes/{n}?seed={seed}"
const response = await fetch('/bytes/{n}?seed={seed}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/bytes/{n}',
    params={
    'seed': '{seed}'
    }
)
data = response.json()
Test Request
GET
/bytes/{n}
seed query
n path *
GET /stream-bytes/{n}

Streams n random bytes generated with given seed, in chunks of chunk_size per packet

Parameters
Name Type In Description
seed string query Seed for random number generation
chunk_size string query Size of each chunk (default: 10240)
n * string path Number of bytes to stream
Responses
200 Streamed random binary data
(value) string Streamed random binary data
"string"
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/stream-bytes/{n}?seed={seed}&chunk_size={chunk_size}"
const response = await fetch('/stream-bytes/{n}?seed={seed}&chunk_size={chunk_size}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/stream-bytes/{n}',
    params={
    'seed': '{seed}',
    'chunk_size': '{chunk_size}'
    }
)
data = response.json()
Test Request
GET
/stream-bytes/{n}
seed query
chunk_size query
n path *
GET /delay/{delay}

Returns a delayed response (max of 10 seconds)

Parameters
Name Type In Description
type object query
additionalProperties object query
delay * string path Delay in seconds (max 10)
Responses
200 Default Response
args object
data string
files object
form object
headers object
origin string
url string
{
  "args": {},
  "data": "string",
  "files": {},
  "form": {},
  "headers": {},
  "origin": "string",
  "url": "string"
}
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/delay/{delay}?type={type}&additionalProperties={additionalProperties}"
const response = await fetch('/delay/{delay}?type={type}&additionalProperties={additionalProperties}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/delay/{delay}',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}'
    }
)
data = response.json()
Test Request
GET
/delay/{delay}
type query
additionalProperties query
delay path *
POST /delay/{delay}

Returns a delayed response (max of 10 seconds)

Parameters
Name Type In Description
type object query
additionalProperties object query
delay * string path Delay in seconds (max 10)
Responses
200 Default Response
args object
data string
files object
form object
headers object
origin string
url string
{
  "args": {},
  "data": "string",
  "files": {},
  "form": {},
  "headers": {},
  "origin": "string",
  "url": "string"
}
400 Default Response
error string
{
  "error": "string"
}
curl -X POST "/delay/{delay}?type={type}&additionalProperties={additionalProperties}"
const response = await fetch('/delay/{delay}?type={type}&additionalProperties={additionalProperties}', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post(
    '/delay/{delay}',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}'
    }
)
data = response.json()
Test Request
POST
/delay/{delay}
type query
additionalProperties query
delay path *
PUT /delay/{delay}

Returns a delayed response (max of 10 seconds)

Parameters
Name Type In Description
type object query
additionalProperties object query
delay * string path Delay in seconds (max 10)
Responses
200 Default Response
args object
data string
files object
form object
headers object
origin string
url string
{
  "args": {},
  "data": "string",
  "files": {},
  "form": {},
  "headers": {},
  "origin": "string",
  "url": "string"
}
400 Default Response
error string
{
  "error": "string"
}
curl -X PUT "/delay/{delay}?type={type}&additionalProperties={additionalProperties}"
const response = await fetch('/delay/{delay}?type={type}&additionalProperties={additionalProperties}', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put(
    '/delay/{delay}',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}'
    }
)
data = response.json()
Test Request
PUT
/delay/{delay}
type query
additionalProperties query
delay path *
DELETE /delay/{delay}

Returns a delayed response (max of 10 seconds)

Parameters
Name Type In Description
type object query
additionalProperties object query
delay * string path Delay in seconds (max 10)
Responses
200 Default Response
args object
data string
files object
form object
headers object
origin string
url string
{
  "args": {},
  "data": "string",
  "files": {},
  "form": {},
  "headers": {},
  "origin": "string",
  "url": "string"
}
400 Default Response
error string
{
  "error": "string"
}
curl -X DELETE "/delay/{delay}?type={type}&additionalProperties={additionalProperties}"
const response = await fetch('/delay/{delay}?type={type}&additionalProperties={additionalProperties}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete(
    '/delay/{delay}',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}'
    }
)
data = response.json()
Test Request
DELETE
/delay/{delay}
type query
additionalProperties query
delay path *
PATCH /delay/{delay}

Returns a delayed response (max of 10 seconds)

Parameters
Name Type In Description
type object query
additionalProperties object query
delay * string path Delay in seconds (max 10)
Responses
200 Default Response
args object
data string
files object
form object
headers object
origin string
url string
{
  "args": {},
  "data": "string",
  "files": {},
  "form": {},
  "headers": {},
  "origin": "string",
  "url": "string"
}
400 Default Response
error string
{
  "error": "string"
}
curl -X PATCH "/delay/{delay}?type={type}&additionalProperties={additionalProperties}"
const response = await fetch('/delay/{delay}?type={type}&additionalProperties={additionalProperties}', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch(
    '/delay/{delay}',
    params={
    'type': '{type}',
    'additionalProperties': '{additionalProperties}'
    }
)
data = response.json()
Test Request
PATCH
/delay/{delay}
type query
additionalProperties query
delay path *
GET /base64/{value}

Decodes base64url-encoded string

Parameters
Name Type In Description
value * string path Base64 encoded value to decode
Responses
200 Decoded value
(value) string Decoded value
"string"
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/base64/{value}"
const response = await fetch('/base64/{value}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/base64/{value}')
data = response.json()
Test Request
GET
/base64/{value}
value path *
GET /stream/{n}

Stream n JSON responses

Parameters
Name Type In Description
n * string path Number of JSON responses to stream (max 100)
Responses
200 Newline-delimited JSON responses
(value) string Newline-delimited JSON responses
"string"
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/stream/{n}"
const response = await fetch('/stream/{n}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/stream/{n}')
data = response.json()
Test Request
GET
/stream/{n}
n path *
GET /range/{numbytes}

Streams n random bytes generated, and supports HTTP Range requests

Parameters
Name Type In Description
duration string query Delay before sending response in seconds
numbytes * string path Number of bytes available
Responses
200 Binary data
(value) string Binary data
"string"
206 Partial binary data
(value) string Partial binary data
"string"
400 Default Response
error string
{
  "error": "string"
}
416 Default Response
error string
{
  "error": "string"
}
curl -X GET "/range/{numbytes}?duration={duration}"
const response = await fetch('/range/{numbytes}?duration={duration}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/range/{numbytes}',
    params={
    'duration': '{duration}'
    }
)
data = response.json()
Test Request
GET
/range/{numbytes}
duration query
numbytes path *
GET /drip

Drips data over a duration after an optional initial delay, then (optionally) returns with the given status code

Parameters
Name Type In Description
duration string query Duration in seconds over which to drip the data (default: 2)
numbytes string query Number of bytes to send (default: 10)
code string query HTTP status code to return (default: 200)
delay string query Initial delay in seconds before starting (default: 2)
Responses
200 Dripped data
(value) string Dripped data
"string"
400 Default Response
error string
{
  "error": "string"
}
curl -X GET "/drip?duration={duration}&numbytes={numbytes}&code={code}&delay={delay}"
const response = await fetch('/drip?duration={duration}&numbytes={numbytes}&code={code}&delay={delay}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get(
    '/drip',
    params={
    'duration': '{duration}',
    'numbytes': '{numbytes}',
    'code': '{code}',
    'delay': '{delay}'
    }
)
data = response.json()
Test Request
GET
/drip
duration query
numbytes query
code query
delay query

Bins

GET /bins

List all active bins

Responses
200 Default Response
bins array(object)
{
  "bins": [
    {
      "id": "string",
      "createdAt": "string",
      "expiresAt": "string",
      "requestCount": 0
    }
  ]
}
curl -X GET "/bins"
const response = await fetch('/bins', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/bins')
data = response.json()
Test Request
GET
/bins
POST /bins

Create a new request bin

Responses
200 Default Response
id string
url string
createdAt string
expiresAt string
requestCount integer
{
  "id": "string",
  "url": "string",
  "createdAt": "string",
  "expiresAt": "string",
  "requestCount": 0
}
curl -X POST "/bins"
const response = await fetch('/bins', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/bins')
data = response.json()
Test Request
POST
/bins
GET /bins/{id}

Get metadata for a single bin

Parameters
Name Type In Description
id * string path
Responses
200 Default Response
id string
createdAt string
expiresAt string
requestCount integer
{
  "id": "string",
  "createdAt": "string",
  "expiresAt": "string",
  "requestCount": 0
}
404 Default Response
error string
{
  "error": "string"
}
curl -X GET "/bins/{id}"
const response = await fetch('/bins/{id}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/bins/{id}')
data = response.json()
Test Request
GET
/bins/{id}
id path *
DELETE /bins/{id}

Delete a bin and all its captured requests

Parameters
Name Type In Description
id * string path
Responses
204 Default Response
404 Default Response
error string
{
  "error": "string"
}
curl -X DELETE "/bins/{id}"
const response = await fetch('/bins/{id}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/bins/{id}')
data = response.json()
Test Request
DELETE
/bins/{id}
id path *
GET /bins/{id}/requests

List captured requests for a bin (newest first)

Parameters
Name Type In Description
id * string path
Responses
200 Default Response
requests array(object)
{
  "requests": [
    {
      "id": "string",
      "binId": "string",
      "method": "string",
      "url": "string",
      "path": "string",
      "query": {
        "key": "value"
      },
      "headers": {
        "key": "value"
      },
      "remoteAddress": "string",
      "contentType": "string",
      "bodySize": 0,
      "body": null,
      "bodyEncoding": "utf8",
      "truncated": true,
      "capturedAt": "string"
    }
  ]
}
404 Default Response
error string
{
  "error": "string"
}
curl -X GET "/bins/{id}/requests"
const response = await fetch('/bins/{id}/requests', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/bins/{id}/requests')
data = response.json()
Test Request
GET
/bins/{id}/requests
id path *
DELETE /bins/{id}/requests

Clear all captured requests for a bin

Parameters
Name Type In Description
id * string path
Responses
204 Default Response
404 Default Response
error string
{
  "error": "string"
}
curl -X DELETE "/bins/{id}/requests"
const response = await fetch('/bins/{id}/requests', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/bins/{id}/requests')
data = response.json()
Test Request
DELETE
/bins/{id}/requests
id path *
GET /bins/{id}/requests/{reqId}

Get a single captured request by id

Parameters
Name Type In Description
id * string path
reqId * string path
Responses
200 Default Response
id string
binId string
method string
url string
path string
query object
headers object
remoteAddress string
contentType string
bodySize integer
body null,string
bodyEncoding string
truncated boolean
capturedAt string
{
  "id": "string",
  "binId": "string",
  "method": "string",
  "url": "string",
  "path": "string",
  "query": {
    "key": "value"
  },
  "headers": {
    "key": "value"
  },
  "remoteAddress": "string",
  "contentType": "string",
  "bodySize": 0,
  "body": null,
  "bodyEncoding": "utf8",
  "truncated": true,
  "capturedAt": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X GET "/bins/{id}/requests/{reqId}"
const response = await fetch('/bins/{id}/requests/{reqId}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/bins/{id}/requests/{reqId}')
data = response.json()
Test Request
GET
/bins/{id}/requests/{reqId}
id path *
reqId path *
GET /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X GET "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/b/{id}')
data = response.json()
Test Request
GET
/b/{id}
id path *
* path *
POST /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X POST "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/b/{id}')
data = response.json()
Test Request
POST
/b/{id}
id path *
* path *
PUT /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X PUT "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/b/{id}')
data = response.json()
Test Request
PUT
/b/{id}
id path *
* path *
DELETE /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X DELETE "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/b/{id}')
data = response.json()
Test Request
DELETE
/b/{id}
id path *
* path *
PATCH /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X PATCH "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/b/{id}')
data = response.json()
Test Request
PATCH
/b/{id}
id path *
* path *
OPTIONS /b/{id}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X OPTIONS "/b/{id}"
const response = await fetch('/b/{id}', {
  method: 'OPTIONS'
});
const data = await response.json();
import requests

response = requests.options('/b/{id}')
data = response.json()
Test Request
OPTIONS
/b/{id}
id path *
* path *
GET /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X GET "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'GET'
});
const data = await response.json();
import requests

response = requests.get('/b/{id}/{*}')
data = response.json()
Test Request
GET
/b/{id}/{*}
id path *
* path *
POST /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X POST "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'POST'
});
const data = await response.json();
import requests

response = requests.post('/b/{id}/{*}')
data = response.json()
Test Request
POST
/b/{id}/{*}
id path *
* path *
PUT /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X PUT "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'PUT'
});
const data = await response.json();
import requests

response = requests.put('/b/{id}/{*}')
data = response.json()
Test Request
PUT
/b/{id}/{*}
id path *
* path *
DELETE /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X DELETE "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'DELETE'
});
const data = await response.json();
import requests

response = requests.delete('/b/{id}/{*}')
data = response.json()
Test Request
DELETE
/b/{id}/{*}
id path *
* path *
PATCH /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X PATCH "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'PATCH'
});
const data = await response.json();
import requests

response = requests.patch('/b/{id}/{*}')
data = response.json()
Test Request
PATCH
/b/{id}/{*}
id path *
* path *
OPTIONS /b/{id}/{*}

Capture any HTTP request sent to a bin. Stores method, headers, body, query, and metadata.

Parameters
Name Type In Description
id * string path Bin identifier
* * string path Sub-path captured with the request
Responses
200 Default Response
ok boolean
binId string
requestId string
{
  "ok": true,
  "binId": "string",
  "requestId": "string"
}
404 Default Response
error string
{
  "error": "string"
}
curl -X OPTIONS "/b/{id}/{*}"
const response = await fetch('/b/{id}/{*}', {
  method: 'OPTIONS'
});
const data = await response.json();
import requests

response = requests.options('/b/{id}/{*}')
data = response.json()
Test Request
OPTIONS
/b/{id}/{*}
id path *
* path *