- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
10-26-2023 04:27 AM - edited 10-26-2023 04:38 AM
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.
- 15,936 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful. Thanks for sharing.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for Sharing!