aio-libs / aiohttp

Asynchronous HTTP client/server framework for asyncio and Python
https://docs.aiohttp.org
Other
15.18k stars 2.03k forks source link

body for HTTP GET request #141

Closed asvetlov closed 10 years ago

asvetlov commented 10 years ago

When aiohttp.request gets GET method with specified data that merges data to url along with params.

I think that's wrong. HTTP protocol standard (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) says nothing about presence/absence body for GET methods.

Moreover elasticsearch uses GETs with body for some REST API methods: see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-multi-get.html and http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-multi-search.html#search-multi-search

I guess to always process data as for POST request if specified.

kxepal commented 10 years ago

http://trac.tools.ietf.org/wg/httpbis/trac/ticket/19 and https://groups.yahoo.com/neo/groups/rest-discuss/conversations/messages/9962

kxepal commented 10 years ago

few more interesting discussions: http://lists.w3.org/Archives/Public/ietf-http-wg/2002JulSep/0031.html http://lists.w3.org/Archives/Public/ietf-http-wg/2007JanMar/0076.html

TL;DR technically, it's ok to send body with GET/DELETE requests. Semantically - it's not. In real world only few uses such "feature".

fafhrd91 commented 10 years ago

+1

let's unify 'data' processing for all type of requests

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

If you feel like there's important points made in this discussion, please include those exceprts into that new issue.