Updates execution/query-requests-with-large-inputs.md

Auto commit by GitBook Editor
This commit is contained in:
apidesigner
2017-02-24 07:56:51 +00:00
parent 2d8d5630a1
commit 869ab8c06a
2 changed files with 20 additions and 0 deletions

View File

@@ -44,6 +44,7 @@
* [Client Application Access Control](execution/api-keys.md)
* [Asynchronous Tasks](execution/asynchronous-tasks.md)
* [Batch Operations](execution/batch-operations.md)
* [Query Requests with Large Inputs](execution/query-requests-with-large-inputs.md)
* [API Clients](clients/README.md)
* [Loose Coupling](clients/loose-coupling.md)
* [Miscellaneous](miscellaneous.md)

View File

@@ -0,0 +1,19 @@
# Query Requests with Large Inputs
While HTTP doesn't impose any limit on the length of an URI some implementation of server or client might have difficulties handling long URIs (usually URIs with many or large query parameters).
Every endpoint with such an URI **MUST** use the HTTP **POST** Request Method and send the query string in HTTP Request Message body using the `application/x-www-form-urlencoded` media type.
_NOTE: Since this operation is safe and idempotent, using the POST method is a misuse of HTTPs uniform interface. A consequence of this implementation is a loss of cache-ability.
#### Example
```
POST /orders HTTP/1.1
Content-Type: application/x-www-form-urlencoded
search=attributes&color=white&size=56&...
```
> _NOTE: Since this operation is safe and idempotent, using the POST method violates the HTTP Protocol semantics and results in loss of cache-ability._