Closed chefsalim closed 6 years ago
Ah, this looks like it may be because the content type is not set correctly on the request - will verify and close out if so
OK confirmed it was the wrong content type :)
@chefsalim Thanks for posting this - I had not seen that one can use (body, req): (Json<..>, HttpRequest<..>)
as the parameter signature, and that solved exactly what I needed!
This may be another issue with not using the framework correctly, however I haven't been able to get to the bottom of what is happening.
I have a handler with an extractor tuple of Json struct and a HttpRequest with appstate - eg,
The handler is registered like so:
When this API is called, I get a panic and 400 return -
The API is getting called with the expected JSON, so it's not clear what is happening here, and whether this is a framework issue or pilot error.