Error code: 1 while trying to make HTTP GET request

Ivan Delchev
Giga Contributor

Hello,

I am trying to retrieve information from external API (not placed within ServiceNow). I am using sn_ws.RESTMessageV2() to make HTTP GET request towards the API but all I get is Error Code 1 the error message says Unkown host. The query itself is okay and working outside ServiceNow. I've set the endpoint URL with all the necessary parameters. Do you have any idea what error code 1 is and how can I make the request to work?

PS. I tried to call other API using absolutely the same code, just changed the endpoint and the parameters and it is working.

Regards,
Ivan

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

did you try to use mid server on your rest message ? if not please give a try to use mid server on your rest message. 

View solution in original post

4 REPLIES 4

Harsh Vardhan
Giga Patron

did you try to use mid server on your rest message ? if not please give a try to use mid server on your rest message. 

I think this is the reason, because the endpoint is sitting behind internal firewall.

Thanks

did it solve your issue ?

 

if yes , kindly mark my answer as correct and close this thread. 

Vikas-Malhotra
Mega Guru

Hi Ivan,

 

I am not sure if there is any HTTP error message with number 1.

Though, unknown host message occurs because of the below mentioned reason.

 

Definition - What does Unknown Host mean?

An unknown host is an error message that generates when a destination computer or host server name cannot be resolved. The message indicates that the user's provided host server name does not exist or match any Domain Name System (DNS) records.

The unknown host message is common when a user tries to connect to a remote host. The error occurs for a number of reasons, including underlying configuration, server unavailability or incorrect host name.
 
Thanks!
Vikas