http icon indicating copy to clipboard operation
http copied to clipboard

Support GET requests with optional body.

Open victoriahuang1 opened this issue 2 years ago • 3 comments

Similar to https://github.com/dart-lang/http/pull/439, but for GET requests.

There are some APIs with GET requests that require a body and not query parameters. It's not possible to use these APIs without supporting this.

victoriahuang1 avatar Nov 28 '23 23:11 victoriahuang1

you want to pass body in the get request , am i correct @victoriahuang1

AlokKumarMaurya avatar Nov 29 '23 03:11 AlokKumarMaurya

you want to pass body in the get request , am i correct @victoriahuang1

yes this is correct

victoriahuang1 avatar Nov 29 '23 15:11 victoriahuang1

@victoriahuang1
Actually we can do that but In 2014, the RFC 7231 superseded HTTP/1.1. It added a warning against the use of GET with a body.

Since we have other methods to do the same thing , that's why we don't have the option you are looking for

AlokKumarMaurya avatar Dec 08 '23 16:12 AlokKumarMaurya

Not all clients support setting a body in the 'GET' request.

brianquinlan avatar May 02 '24 23:05 brianquinlan