From a59ea8b6fd4c6925f2fc209bdfd90394a9213d55 Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 12 Jul 2021 13:07:30 -0400 Subject: [PATCH] Add HTTPResponse /api/error/ docs --- docs-src/api/Simulating Responses.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs-src/api/Simulating Responses.md diff --git a/docs-src/api/Simulating Responses.md b/docs-src/api/Simulating Responses.md new file mode 100644 index 0000000..d33a6fd --- /dev/null +++ b/docs-src/api/Simulating Responses.md @@ -0,0 +1,19 @@ +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](https://docs.python.org/3/library/http.html#http.HTTPStatus). + +## Endpoint +``` +GET /api/error/{response_code} +``` +### Parameters +Name | Value +- | - +`response_code` | The HTTP response code to be returned. + +## Example +```bash +curl {{production_url}}/api/error/301 +``` +```jsonc +// Expected Output +{"message": "Moved Permanently"} +``` \ No newline at end of file