POST request works with POSTMAN but not in my Java application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:05 AM
I brief description of what I'm doing, I'm automating creating incidents in ServiceNow using API. I have tested with POSTMAN first and it works fine.
Now after I wrote my code, I try to POST data to the same url , I got no respond from the server. what could be the problem?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 04:06 AM
Ok. since you are using a scripted REST API can you put a log inside and tell the output
var requestBody = request.body;
var requestData = requestBody.data;
gs.info('##'+requestData);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 04:32 AM
its a structured method in Java not really a script. it catch exceptions and error, the error its thrown is no respond from the server

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:23 AM
Hi,
Please refer below link, that may helps.
Please mark Correct/Helpful. if it is helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:26 AM
I don't have issue with coding, I have experience with rest API in Java so that's not the issue! its more about the respond from the sever!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:40 AM
Okies..
If you have an issue with ServiceNow, that is due to planned maintenance by the servicenow team.
Have to wait till the maintenance is completed. Please try after some time and check if it works.
Please mark Correct/Helpful. if it is helpful.