Closed xpe closed 9 years ago
from_content
for a request with Content-Type: application/json
would be parse the JSON payload into an internal structure. On failure, return 400 Bad Request
(and maybe an error message, possibly application/problem)
In for-GET/machine
the implementation is a bit different (might be outdated too), but the default processing for a urlencoded payload is https://github.com/for-GET/machine/blob/1bcee13974513ec1b79c6fdd1ecbbde332543361/src/Resource.coffee#L107 . There I pass as configuration METHOD_content_types_accepted
as a key-value mapping from content-type to parsing-handler.
Please reopen issue if still unclear.
Thanks for the quick response.
I don't see it in the docs. The closest I've found is: https://github.com/for-GET/http-decision-diagram/blob/master/doc/README_request.md#from_content--in