Rest API Call Issue - HttpStatus returns 0

Roy B
Kilo Contributor

Hello ,

I am making a REST API call and keep getting httpstatus code as 0 with the following error 

The request failed: java.lang.IllegalArgumentException: host parameter is null","status":"0".

I have the endpoint url configured correctly. 

Any idea why it is returning a status code 0.

 

4 REPLIES 4

Mike Patel
Tera Sage

Can you share screenshot of request?

Archana30
Tera Contributor

Hello,

 

Were you able to resolve the issue. 

 

Thanks

God, this was a problem four years ago..

I once had a status code of 0 when the midserver did not set proxy.But the error seems different

error:java.net.SocketTimeoutException:Connect timed out

in addition,It seems that this problem can also occur if there are special characters in the URL without encoding.

error:java.lang.IllegalArgumentException:Invalide uri

You can try the following methods:

endPointURL = encodeURI(endPointURL);

What about your specific problems and error messages

panda1
Kilo Guru

I once had a status code of 0 when the midserver did not set proxy.But the error seems different

in addition,It seems that this problem can also occur if there are special characters in the URL without encoding.

You can try the following methods:

endPointURL = encodeURI(endPointURL);