Policies
Form Data to JSON Policy
Converts form data in the incoming request to JSON.
Configuration
The configuration shows how to configure the policy in the 'policies.json' document.
{ "name": "my-formdata-to-json-inbound-policy", "policyType": "formdata-to-json-inbound", "handler": { "export": "FormDataToJsonInboundPolicy", "module": "$import(@zuplo/runtime)", "options": { "badRequestIfNotFormData": true } } }
Policy Options
The options for this policy are specified below. All properties are optional unless specifically marked as required.
badRequestIfNotFormData
<boolean> -Should the policy return an error if the request is not of the type form data.Defaults totrue
.optionalHoneypotName
<string> -The name of the honeypot field. Used to provide basic spam filtering.
Using the Policy
Read more about how policies work