The CreatorCon Call for Content is officially open! Get started here.

POST request works with POSTMAN but not in my Java application

Ikenahim
Kilo Explorer

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?

 

 

9 REPLIES 9

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);

 

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 

Geetanjali Khy2
Mega Guru

Hi,

Please refer below link, that may helps.

https://community.servicenow.com/community?id=community_question&sys_id=9bf3b5a3db455f805322f4621f96...

 


Please mark Correct/Helpful. if it is helpful.

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! 

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.