ninenines / gun

HTTP/1.1, HTTP/2, Websocket client (and more) for Erlang/OTP.
ISC License
892 stars 232 forks source link

GET request with body is possible. #136

Closed refactor closed 6 years ago

refactor commented 6 years ago

It seems GET method can carry body, when I use elasticsearch, I found it use tons of GET request with body, which carry DSL query.

"Both HTTP GET and HTTP POST can be used to execute search with body. Since not all clients support GET with body, POST is allowed as well."

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html

essen commented 6 years ago

Sure? I don't think Gun restricts this in any way. Just use gun:request if you want to do something exotic.