mmattozzi / cocoa-rest-client

A free, native Apple macOS app for testing HTTP/REST endpoints
http://mmattozzi.github.io/cocoa-rest-client/
Other
2.35k stars 206 forks source link

Raw body not sent with GET request #63

Open ianneub opened 9 years ago

ianneub commented 9 years ago

It would be nice if the request body was sent along with a GET request. My use case is some finicky API that only accepts GET requests, but uses the body to parse a query.

While this is bad form, it doesn't seem violate the HTTP spec to send a body with a GET request.

fourlincoln10 commented 9 years ago

+1 for this issue. I use cocoa-rest-client to query elasticsearch and passing a get request body is important for that.

JeremyAgost commented 7 years ago

Eggplant eggplant eggplant eggplant eggplant Those eggplants represent the amount of swearing I did while trying to debug while my webserver was ignoring the GET body, before I checked the issue tracker and found out that this app doesn't send the body with a GET request.

mmattozzi commented 7 years ago

Yeah... sorry about this. I will loosen this restriction in the next release. If there's one thing I've learned over the years of working on this project it's that people/frameworks throw anything they want into the HTTP method and that anything goes when it comes to usage of methods.

mmattozzi commented 7 years ago

Playing around with this a bit and it may not even be possible with the NSMutableURLRequest class that is built into Cocoa. Initiating a GET request with a body just results in the connection getting closed ... even if I run this against basically an open port (netcat). I'm wondering if there is something in the Objective-C API library that breaks when trying to do this.