Simulating Responses
Returns the requested HTTP response with a JSON payload containing the response phrase. Valid response codes and phrases are pulled from the Python http library index.
Endpoint⚓︎
GET /api/error/{response_code}
Parameters⚓︎
| Name | Value |
|---|---|
response_code |
The HTTP response code to be returned. |
Example⚓︎
curl https://engineering.purdue.edu/webqueue/webqueue2/build/api/error/301
// Expected Output
{"message": "Moved Permanently"}