When using the RFA Web API:
The X-Requested-With header must be set. For Web browser clients, this is typically set to XMLHttpRequest. For other clients, you should give this a value that clearly identifies it as your application.
For APIs that return file data, the Content-Type can be set to various values depending on the file type inferred from the file extension. Certain common file extensions are recognized and Content-Type is set accordingly, for example to text/plain or image/jpeg. Unrecognized file types are sent as application/octet-stream. You can set Accept to */* for requests that return files, or to a more-specific value such as text/*; application/*.
For any API that requires a body in the request, the Content-Type header must be set to application/json. The body length must be indicated per the HTTP/1.1 standard, with either the Content-Length header set to the length of the body in octets, or the chunked transfer-encoding used.
For file uploads, set Content-Type to application/octet-stream or, if you prefer, to a more-specific value.
You can have file data compressed for transfer when downloading by setting Accept-Encoding to gzip. It is the client's responsibility to decompress the data.
You can compress the file data for transfer when uploading using the gzip algorithm. Set Transfer-Encoding to gzip, or gzip, chunked if the request is chunked, in this case.