Uses
Use this mock status code and redirect service to validate how
your applications and scripts handle different responses.
Features
- HTTPS only
- GET requests only
-
Returns status codes, redirect chains, response headers and
response bodies
-
Simulates redirect chains (by setting a specified number of
redirects)
-
Support for setting delays for responses (including redirects)
- Set up multiple custom response headers
Use this endpoint to get the response of a specific status code.
To add a specific status code to the URL, you can simply append it
at the end of the URL. For example:
https://mock.httpstatus.io/200
Status codes
Use these URLs for the response codes that are supported:
URLs
Status code | Message | Path |
---|
200 | OK | /200 |
201 | Created | /201 |
202 | Accepted | /202 |
203 | Non-Authoritative Information | /203 |
204 | No Content | /204 |
205 | Reset Content | /205 |
206 | Partial Content | /206 |
207 | Multi-Status | /207 |
208 | Already Reported | /208 |
226 | IM Used | /226 |
300 | Multiple Choices | /300 |
301 | Moved Permanently | /301 |
302 | Found | /302 |
303 | See Other | /303 |
304 | Not Modified | /304 |
307 | Temporary Redirect | /307 |
308 | Permanent Redirect | /308 |
400 | Bad Request | /400 |
401 | Unauthorized | /401 |
402 | Payment Required | /402 |
403 | Forbidden | /403 |
404 | Not Found | /404 |
405 | Method Not Allowed | /405 |
406 | Not Acceptable | /406 |
407 | Proxy Authentication Required | /407 |
408 | Request Timeout | /408 |
409 | Conflict | /409 |
410 | Gone | /410 |
411 | Length Required | /411 |
412 | Precondition Failed | /412 |
413 | Payload Too Large | /413 |
414 | URI Too Long | /414 |
415 | Unsupported Media Type | /415 |
416 | Range Not Satisfiable | /416 |
417 | Expectation Failed | /417 |
418 | I'm a Teapot | /418 |
421 | Misdirected Request | /421 |
422 | Unprocessable Entity | /422 |
423 | Locked | /423 |
424 | Failed Dependency | /424 |
425 | Too Early | /425 |
428 | Precondition Required | /428 |
429 | Too Many Requests | /429 |
431 | Request Header Fields Too Large | /431 |
451 | Unavailable For Legal Reasons | /451 |
500 | Internal Server Error | /500 |
501 | Not Implemented | /501 |
502 | Bad Gateway | /502 |
503 | Service Unavailable | /503 |
504 | Gateway Timeout | /504 |
505 | HTTP Version Not Supported | /505 |
506 | Variant Also Negotiates | /506 |
507 | Insufficient Storage | /507 |
508 | Loop Detected | /508 |
509 | Bandwidth Limit Exceeded | /509 |
510 | Not Extended | /510 |
511 | Network Authentication Required | /511 |
Redirect chain
Use this URL to create and simulate a redirect chain:
URLs
Status code | Message | Path |
---|
307 | Temporary Redirect | /chain |
Parameters
Use these params below to delay responses, set the number of
simulated redirects in a chain or return custom response headers:
Query
Parameter | Type | Default | Description | Required |
---|
delay | string | |
Set a delay for a response. This parameter also sets a
delay for each redirect and the final response in a
redirect chain. Should contain a minimum value of 1 and
maximum value of 60000 milliseconds.
| No |
count | string | |
Defines the number of redirect responses which should be
followed by the client. Should contain a minimum value of
1 and a maximum value 25 redirects. Required only for the
/chain path.
| Yes |
Headers
Parameter | Type | Default | Description | Required |
---|
accept | string | text/html |
Sends response body as text/html or application/json
content type.
| No |
x-delay | string | |
Set a delay for a response. This parameter also sets a
delay for each redirect but not for the final response in
a redirect chain. Should contain a minimum value of 1 and
maximum value of 60000 milliseconds.
| No |
x-response | string | |
Set one or more custom response header(s). Use a
combination like
Foo:Bar where Foo is the header
name and Bar is the header value. Setting two
or more headers with the same header name will overwrite
the previous one. Add a comma between header values to set
multiple values for the same header name. Custom headers
are not set for responses in the /chain path.
| No |
Response headers
The endpoint itself returns some fixed response headers that you
can use in your scripts or applications to get more insights:
Headers
Header name | Description |
---|
x-response-time |
The total server response time including the set delay.
|
server-timing |
Server-timing header that confirms the duration of the
delay set using a query or request header param. A
response looks like
delay;desc="Delay set";dur=1000 where in this
example the response was delayed by 1 second.
|
x-redirect-by |
This header identifies which source is responsible for
performing a redirect.
|