steventwerd
4 years agoOccasional Contributor
java.net.UnknownHostException error REST API
Hi,
I'm using the open source (free) SaopUI and I am attempting to connect to the api: https://api.genderize.io
When I run the tests with internet connection it works fine but when I run without internet connection I get the error: java.net.UnknownHostException.
I've been told that APIs shouldn't be affected by internet access, I am relatively new to REST APIs so can someone confirm whether internet access is required for REST APIs and if so why my test isn't working when I turn my internet off?
Thanks
- Thanks.
If you are making a rest call to this (https://api.genderize.io) endpoint then it may not be possible to access without internet.
Not sure what you are trying to achieve.
You may run a mockservice as explained below video (you may not need internet )
https://www.youtube.com/watch?v=L2SMZ9bbDvE
Here you can find the required info
https://stackoverflow.com/questions/30580562/what-is-the-difference-between-resource-and-endpoint