lambda-local
lambda-local copied to clipboard
Content-type header should not be required for get requests
Currently You cannot make a Get request if content-type header is not set to application/json
(e.g. via browser)
This is not standard behaviour, Content heard should only be required for request with a body, e.g. POST, PUT (maybe if GET has a body?)
see https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.5
A sender that generates a message containing a payload body SHOULD generate a Content-Type header field in that message unless the intended media type of the enclosed representation is unknown to the sender. If a Content-Type header field is not present, the recipient MAY either assume a media type of "application/octet-stream" ([RFC2046], Section 4.5.1) or examine the data to determine its type.