Skip to content

Conversation

@mwijngaard
Copy link

According to the PSR-7 spec, the behavior of ServerRequestInterface::parsedBody is only really specified for multipart/form-data and application/x-www-form-urlencoded requests (in which case it should contain the contents of $_POST). With other request types, the parsedBody MAY return an unserialized version of the body, but since it's not really practical to build parsers for all known formats into a http library it should be perfectly acceptable to return nothing. This PR moves the parsing of the json body into parsePsrRequest.

@simPod
Copy link
Collaborator

simPod commented Apr 26, 2020

@mwijngaard mind checking if #598 does not replace this already?

@mwijngaard
Copy link
Author

@simPod Yes it would seem so :-). I noticed that after i submitted the PR. But I left mine open as your PR has been open for a long time and this fix seems more trivial so I was hoping it would be merged a little quicker.

@vladar
Copy link
Member

vladar commented Jun 8, 2020

I am going to close this as #598 is merged now

@vladar vladar closed this Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants