HttpUrl url = new HttpUrl.Builder().scheme("http")
.host("localhost:8080") // here I'm getting error
.addPathSegment("organization").build();
这是错误=> java.lang.IllegalArgumentException:意外的主机:localhost:8080
答案 0 :(得分:3)
是:
HttpUrl url = new HttpUrl.Builder().scheme("http")
.host("localhost")
.port(8080)
.addPathSegment("organization").build();