Why does Status Codes exist?

Status Codes is a simple easy to use service that returns the requested HTTP Status code. The project was originally developed to help me better understand Cloudflare Workers, their capabilities and continuous deployment from GitHub. While there are other services, I do not believe there are any that are as responsive globally as Status Codes, due to the deployment of the site on the edge of Cloudflare's network.

Making A Request

To make a request simply add the status code to the end of the url, for example https://statuscodes.peth.me/200.

By default a GET request will return a body with the status code name, i.e. "200 OK". If you would like no body returned simply add ?body=flase to the end of the url, for example https://statuscodes.peth.me/200?body=flase

Random Response

When building applications they must be able to deal with an unexpected response. For this reason there there is a 'random' request type.

Supported Request Types

Status Codes supports GET, POST, PUT, PATCH, DELETE, COPY, HEAD, OPTIONS, LOCK, UNLOCK and PROPFIND request types.

Supported Status Codes

200OK

201CREATED

202Accepted

203Non-Authoritative Information

204No Content

205Reset Content

206Partial Content

207Multi-Status

208Already Reported

226IM Used

300Multiple Choices

301Moved Permanently

302Found

303See Other

304Not Modified

307Temporary Redirect

308Permanent Redirect

400Bad Request

401Unauthorized

402Payment Required

403Forbidden

404Not Found

405Method Not Allowed

406Not Acceptable

407Proxy Authentication Required

408Request Timeout

409Conflict

410Gone

411Length Required

412Precondition Failed

413Payload Too Large

414URI Too Long

415Unsupported Media Type

416Range Not Satisfiable

417Expectation Failed

418I'm a teapot

421Misdirected Request

422Unprocessable Entity

423Locked

424Failed Dependency

425Too Early

426Upgrade Required

428Precondition Required

429Too Many Requests

431Request Header Fields Too Large

451Unavailable For Legal Reasons

500Internal Server Error

501Not Implemented

502Bad Gateway

503Service Unavailable

504Gateway Timeout

505HTTP Version Not Supported

506Variant Also Negotiates

507Insufficient Storage

508Loop Detected

509Bandwidth Limit Exceeded

510Not Extended

511Network Authentication Required

520Origin Error

521Web server is down

522Connection timed out

523Proxy Declined Request

524A timeout occurred

525SSL Handshake Failed

526Invalid SSL Certificate

527Railgun Error

530Cloudflare - Error 530 is returned along with a 1xxx error.

598Network read timeout error

599Network connect timeout error

FAQs

Why don't you support 1xx status codes?

Status Codes is run using Cloudflare Workers. Unfortunately they limit the allowed status code returns to 200-599. If a request is made to any 1xx pages a 501 Not Implemented status will be returned.

What monitoring is in place to ensure Status Codes is working correctly?

All endpoints are regularly tested to ensure it is returning the expected results, using Postman. All endpoints are tested at a minimum weekly, with some tested every 5 minutes.

Are requests tracked?

Status Codes is built on-top of Cloudflare Workers. Cloudflare provides limited analytics on the total number of request made, country and requests blocked. No tracking outside what is required by Cloudflare is conducted.

Are there any usage limitations?

There are no hard defined usage limitations for Status Codes by Sam Petherbridge. The services is hosted by Cloudflare and is thus subject to their normal protections.