HTTP Content Type Negotiation
- All text data in requests sent to GRNconnect servers MUST be in UTF-8 encoding, unless explicitly indicated otherwise.
- Clients MUST send all API requests with the header Content-Type: application/json. There MUST NOT be any media type parameters.
| Header Key | Value |
|---|---|
| Content-Type | application/json |
| Accept | application/json |
| Accept-Encoding | application/gzip |
- Clients MUST specify the same media type for Accept header as well. There MUST NOT be any media type parameters.
- If a response from the server contains any media type parameters, clients MUST ignore them
Error Codes
| HTTP Status Code | Error Code | Description |
|---|---|---|
| 400 | 1104 | Malformed syntax in request body |
| 406 | 1105 | Response content type is not acceptable according to the request accept headers |
| 415 | 1103 | Unsupported media type |