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

sachinbhasin11
Tera Guru

Hi,

 

What is the error code you are getting in the response? and where are you calling the code from public network or restricted?

the error is connection timed out. I'm making connection from the same network where I tested with POSTMAN!

Are you using a scripted REST API or a table API?

 

Also could you check the property 'com.glide.communications.httpclient.verify_hostname' in system properties and turn it to 'false' 

In case if the property doesn't exist create one

Are you using certificates for auth?

I'm using scripted REST API.

I have added the certificate to the Java keystore, so there is no issue with validating host name.

I have disabled SSL validation, doesn't work as well still same problem. the sever doesn't respond to my request