java.net.UnknownHostException error REST API
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?
Solved! Go to Solution.
One would get the error without connecting to internet otherwise. Do you see anything wrong with that?
When you say service do you mean the genderize api endpoint?
Also could you provide an example of when it would be possible to use a REST API without internet?
Would you please answer?
Is the service running on you local machines (PC or laptop) ?
I did ask what you meant by service, if you are talking about the genderize api endpoint than no I don't think it is running locally on my laptop/pc.
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 )
Here you can find the required info