GET /api/200 HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Host: example.com
Content-Type: application/json;charset=utf-8
Content-Length: 89
{
"status": "OK",
"message": "リクエストは正常に処理されました"
}
GET /api/200/invalid HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
Host: example.com
Content-type: application/json;charset=utf-8
Content-Length: 156
{
"status": "OK. but..."
"message": "リクエストは正常に処理されました。でも、この JSON には構文エラーがある?"
}
GET /api/400 HTTP/1.1
Host: example.com
HTTP/1.1 400 Bad Request
Host: example.com
Content-Type: application/json;charset=utf-8
Content-Length: 80
{
"status": "Bad Request",
"message": "不正なリクエストです"
}
GET /api/500 HTTP/1.1
Host: example.com
HTTP/1.1 500 Internal Server Error
Host: example.com
Content-Type: application/json;charset=utf-8
Content-Length: 117
{
"status": "Internal Server Error",
"message": "リクエストの処理中にエラーが起きました"
}