This specification defines the HTTP QUERY request method as a means of making a safe, idempotent request (Section 9.2 of [HTTP]) that encloses a representation describing how the request is to be processed by the target resource.¶
A common query pattern is:¶
However, when the data conveyed is too voluminous to be encoded in the request's URI, this pattern becomes problematic:¶
often size limits are not known ahead of time because a request can pass through many uncoordinated systems (but note that Section 4.1 of [ HTTP ¶
¶ expressing certain kinds of data in the target URI is inefficient because of the overhead of encoding that data into a valid URI,¶
request URIs are more likely to be logged than request content, and may also turn up in bookmarks,¶
encoding queries directly into the request URI effectively casts every possible combination of query inputs as distinct resources.¶
As an alternative to using GET, many implementations make use of the HTTP POST method to perform queries, as illustrated in the example below. In this case, the input to the query operation is passed as the request content as opposed to using the request URI's query component.¶
A typical use of HTTP POST for requesting a query is:¶
In this variation, however, it is not readily apparent -- absent specific knowledge of the resource and server to which the request is being sent -- that a safe, idempotent query is being performed.¶
... continue reading