-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
API responses do not specify Content-Type
e.g.
curl -vvv localhost:4001/plugins/auth_key/issue_key -H 'Content-Type: application/json' -d '{"developer_id": "1dec6c98-4593-4e2f-8a19-8d84c84d9a19"}'
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 4001 (#0)
> POST /plugins/auth_key/issue_key HTTP/1.1
> Host: localhost:4001
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 56
>
* upload completely sent off: 56 out of 56 bytes
< HTTP/1.1 201 Created
< server: Cowboy
< date: Fri, 19 Apr 2019 14:10:21 GMT
< content-length: 46
< cache-control: max-age=0, private, must-revalidate
<
* Connection #0 to host localhost left intact
{"key":"02ca521e-8bb3-486c-b8f2-54025022fcd6"}
Content-Type header is missing. HTTP Spec Says https://tools.ietf.org/html/rfc2616#section-7.2.1
Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body.
See recommendations
https://www.programmableweb.com/news/rest-api-design-put-type-content-type/2011/11/18
Metadata
Metadata
Assignees
Labels
No labels