stub-http icon indicating copy to clipboard operation
stub-http copied to clipboard

Body match always fails with PUT request

Open xelnaga opened this issue 4 years ago • 2 comments

Setting up a route for a PUT request with a body will always fail to match the body.

This is because the PUT body data is keyed on the request with "content" and not "postData".

Line 34 of stub-http.internal.spec needs to use the method to determine the correct key.

xelnaga avatar Jun 01 '21 09:06 xelnaga

It appears that a PATCH request also has some problems with the body not coming through at all. Perhaps this is a limitation of NanoHttpd?

xelnaga avatar Jun 01 '21 10:06 xelnaga

I think it's a limitation of NanoHttpd unfortunately :(

johanhaleby avatar Jun 02 '21 04:06 johanhaleby