Request Headers
When making GET, PUT, POST and DELETE requests for resources on a REST API, a number of request headers can be included to control the response.
- Content-Type
- Required for all requests and usually set to application/json. The exception is when requesting binary data, in this instance it should be set to */*.
- Accept-Language
- Optional and should be set to change the response content language. Setting an accept-language header only applies to the current request.
- Referer
- Required for all HTTP requests that might modify the state of the server, that is, PUT, POST and
DELETE. The value of the Referer header is checked to see whether it meets any of the following conditions:
- The URI Scheme name exactly matches 'curam' for example, the following Referer URI is valid: curam://foundational.app. However, the following does not match other://somedomain.com. Using "curam" URI scheme name is useful for non-browser HTTP clients like mobile apps.
- The scheme is HTTP or HTTPS and the authority (domain) matches localhost or the Cúram configured domain.