Reputation: 49
HttpUrl url = new HttpUrl.Builder().scheme("http")
.host("localhost:8080") // here I'm getting error
.addPathSegment("organization").build();
And this is error => java.lang.IllegalArgumentException: unexpected host: localhost:8080
Upvotes: 0
Views: 375
Reputation: 102822
It's:
HttpUrl url = new HttpUrl.Builder().scheme("http")
.host("localhost")
.port(8080)
.addPathSegment("organization").build();
Upvotes: 4