Unable to get header parameters for a GET request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 12:18 AM
I am trying to get a token value form the header parameter of a GET request. But when i try that from 'Test' related link of the HTTP method of REST message, i get this error in 'Response' and nothing in parameters.
Also when i try calling the request and method using background script and print the response, i see the same error. Using script when i try to print the header i get 'null'.
screenshot of REST message:
screenshot of HTTP method:
screenshot of the script and its result:
Can anyone please help in getting the response or point in direction where/how that can be done in ServiceNow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 01:33 AM
Hi,
The error says that your API Endpoint is not supporting GET. Not all endpoint support all methods. You need to use a method that is compatible with the endpoint.
Regards,
Niklas