HTTP Methods and Payload Formats
Select a method and payload format that the sender can use.
3 min read
Use this guide to match sender requests to the acceptance rules of an endpoint.
Purpose#
This guide explains:
- The methods that an endpoint accepts.
- How PayloadRelay handles each payload format.
- The feature limits for the no-body mode and the text payload mode.
Before you start#
- Access to the endpoint create page and the endpoint edit page.
- Knowledge of the method and the content type of the sender.
Procedure#
1. Choose accepted HTTP method#
Available values:
ANYGET,POST,PUT,PATCH,DELETE,OPTIONS,HEAD,TRACE
Use these rules:
- New webhook endpoints use
POSTandJSONby default. - Use one specific method. Use
ANYonly if the endpoint must accept more than one method.ANYalso accepts methods such asGETandHEAD. Each accepted request can create a delivery and consume quota. - Use
OPTIONS,HEAD, andTRACEonly if the sender needs them. PayloadRelay handles a browser CORS preflight request separately. That request does not need anOPTIONSendpoint configuration.
2. Choose expected payload format#
For body-capable methods (POST, PUT, PATCH, DELETE, OPTIONS, TRACE):
JSON(application/json)XML(application/xmlortext/xml)FORM(application/x-www-form-urlencoded)text/plainNone (ignore body): PayloadRelay ignores the request bodyQuery Parameters: PayloadRelay parses every URL query parameter as a key-value pairQuery Parameters (Base64 JSON): one query parameter contains a Base64-encoded JSON payload
For GET/HEAD:
None (ignore body)(default)Query ParametersQuery Parameters (Base64 JSON)
3. Understand feature interactions#
- PayloadRelay disables the field validation for the
text/plainformat and theNoneformat. - Field validation is available with
Query ParametersandQuery Parameters (Base64 JSON), including onGETandHEAD, because PayloadRelay parses these formats to JSON. - A captcha needs a body-capable method and a
JSON,FORM, orXMLpayload. - A method mismatch logs
METHOD_NOT_ALLOWED. - A content-type mismatch returns an unsupported media type error.
- The
Noneformat and the query parameter formats accept everyContent-Typeheader.
4. Using query parameter formats#
For more details, see the Query Parameters guide.
5. Use sample traffic#
- Send representative requests from the sender.
- Make sure that Activity shows the expected outcomes.
- If the behavior of the sender is different, adjust the endpoint configuration.
Expected result#
- Incoming requests match the configured method and content type.
- Activity shows each rejection with an outcome and an error.
Common issues and fixes#
- The sender sends
POSTand the endpoint acceptsGET: change one side. - Wrong content-type header: correct the
Content-Typeof the sender. - The validation is not available: examine the method and the payload format.