Reputation: 79
I'm trying to call an api in my Android application. and the url template is like:
test--.domainname.com/api/xxxxxx
I'm using Retrofit2 but I got the follow Exception:
Unable to resolve host "test---.domainname.com": No address associated with hostname
I'm sure I can got the success response from the url using browser. And Retrofit2 works very well for other api without '-' or '_' in the path.
Is the exception a feature of okHttp or Retrofit? or just someone can help me with this problem?
I've read the 1552 issue of Retrofit. And I'm sure I add the correct scheme.
Upvotes: 0
Views: 413
Reputation: 3527
test--.domainname.com/api/xxxxxx
this subdomain is ended with symbol -
, this is incorrect. So check your link first.
Upvotes: 1