EasyPythonJavaScriptTypeScript

HTTP Status Text

Node.jsHTTP

Map an HTTP status code to its standard text.

Supported codes: 200 OK, 201 Created, 204 No Content, 301 Moved Permanently,
302 Found, 304 Not Modified, 400 Bad Request, 401 Unauthorized, 403 Forbidden,
404 Not Found, 409 Conflict, 422 Unprocessable Entity, 429 Too Many Requests,
500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable.

Unknown code → 'Unknown'.

Sample tests

Test #1200 OK
Input: [200]
Output: "OK"
Test #2404
Input: [404]
Output: "Not Found"
Test #3500
Input: [500]
Output: "Internal Server Error"
Test #4Unknown code
Input: [999]
Output: "Unknown"
Test #5429 rate limit
Input: [429]
Output: "Too Many Requests"