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 03:21 AM
Hi,
What is the error code you are getting in the response? and where are you calling the code from public network or restricted?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:24 AM
the error is connection timed out. I'm making connection from the same network where I tested with POSTMAN!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:41 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2019 03:59 AM
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