Skip to main content

HTTP request requirements

Incoming HTTP requests to any of our APIs must meet specific requirements. If a request does not follow the required structure, then it will fail and return an appropriate error response.

POST and PUT requests

For HTTP/1.1 POST and PUT requests, our APIs always expect a body. This means the request must explicitly indicate the body's length or use chunked transfer encoding, even if the body is empty.

To satisfy this requirement, the request must include either:

  • A Content-Length header.
  • A Transfer-Encoding header with chunked as the final value.

If neither of the above options are present, or if chunked is not the final encoding listed, then the request will fail and return an error message with a 411 Length Required status code.

Note

This requirement only applies to HTTP/1.1. It does not apply to HTTP/2, which handles message framing differently.

Example: HTTP/1.1 POST request with Content-Length header
POST /example-api HTTP/1.1
Host: api.signicat.com
Content-Type: application/json
Content-Length: 16

{"name": "Jane"}
Case: Empty body

Request with empty body must also include Content-Length: 0 or Transfer-Encoding: chunked.

GET requests

For HTTP/1.1 and HTTP/2 GET requests, our APIs do not support a body. Any GET request that includes a body will fail and return an error message with a 400 Bad Request status code.