Control request and response content type x-www-form-urlencoded
x-www-form-urlencoded is not a standard content type for data transmission. You might be referring to application/x-www-form-urlencoded, which is a common content type used when submitting data through HTML forms on the web. It is a way of encoding key-value pairs as a string in the format of key1=value1&key2=value2.
I was doing integration with PRTG, the idea was to get the alerts and create incident in ServiceNow. However while creating web-hook comes with the this particular content type. You can try to use it as follows :
- Create scripted rest api :
Override default supported request formats as : application/x-www-form-urlencoded
Scripted resource as follows :
we can retrieve the urlencoded values provided in the request as a JSON map. You can then supply these urlencoded key-value pairs as query parameters, in the request body, or both. They are combined and stored in the request parameters. Access these parameters through the request.queryParams object.
Testing : Tool used Postman
We are getting 200 ok. You can add log messages in order to see the response.
https://www.servicenow.com/community/itom-articles/control-request-and-response-content-type-x-www-form-urlencoded/ta-p/2714234