Forum Discussion

steventwerd's avatar
steventwerd
Occasional Contributor
5 years ago
Solved

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

 

 

5 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Is the service running on you local machines (PC or laptop)?

    One would get the error without connecting to internet otherwise. Do you see anything wrong with that?
    • steventwerd's avatar
      steventwerd
      Occasional Contributor

      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?

      • nmrao's avatar
        nmrao
        Community Hero

        Would you please answer?

        Is the service running on you local machines (PC or laptop) ?