| ... | ... | @@ -6,13 +6,15 @@ Ensembl REST uses a number of HTTP headers in REST to flag various parts of meta |
|
|
|
Header|Type|Description|Example
|
|
|
|
------|----|-----------|-------
|
|
|
|
`Accept`|MIME Type|The required encoding of the response body. Supported in both GET and POST|`text/x-fasta`
|
|
|
|
`Accept-Encoding`|MIME Type|Flag that you can handle a gzipped response body and will decompress it before using it. Very useful to speed up your transfers|`gzip`
|
|
|
|
`Accept-Encoding`|String|Flag that you can handle a compressed response body (gzip or deflate) and will decompress it before using it. Very useful to speed up your transfers|`gzip`, `gzip,deflate`
|
|
|
|
`Content-Type`|MIME Type|When used in a POST it flags the encoding of the request body **only**. In GET it flags the required encoding of the response.|`application/json`
|
|
|
|
`Origin`|URL|Specifies an origin domain from which a request is being made. Used with [CORS](CORS-And-JSONP)|`Origin: http://www.example.com`
|
|
|
|
|
|
|
|
## Response Headers
|
|
|
|
|
|
|
|
Header|Type|Description|Example
|
|
|
|
------|----|-----------|-------
|
|
|
|
`Access-Control-Allow-Origin`|URL|Responds with the domains allowed to interact with REST without violating same origin policy. Used with [CORS](CORS-And-JSONP). This defaults to `*` (we allow any website to script against us).|`Access-Control-Allow-Origin: *`
|
|
|
|
`Content-Length`|Integer|Show how long the content is in bytes|14
|
|
|
|
`Content-Type`|MIME Type|The encoding of the response body|`text/x-fasta`
|
|
|
|
`Retry-After`|Float|Sent back when we hit a 429 error and exceed the rate limit. Client should wait for this period before sending another request|1.0232
|
| ... | ... | |