public class DomainUrlParser extends java.lang.Object implements UrlParser
比如:
1.
旧 URL 地址为 https://www.github.com/wiki, 您调用 RetrofitUrlManager.putDomain(String, String)
方法传入的 URL 地址是 https://www.google.com/api, 经过本解析器解析后生成的新 URL 地址为 http://www.google.com/api/wiki
2.
旧 URL 地址为 https://www.github.com/wiki, 您调用 RetrofitUrlManager.putDomain(String, String)
方法传入的 URL 地址是 https://www.google.com, 经过本解析器解析后生成的新 URL 地址为 http://www.google.com/wiki
| Constructor and Description |
|---|
DomainUrlParser() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(RetrofitUrlManager retrofitUrlManager)
这里可以做一些初始化操作
|
okhttp3.HttpUrl |
parseUrl(okhttp3.HttpUrl domainUrl,
okhttp3.HttpUrl url)
|
public void init(RetrofitUrlManager retrofitUrlManager)
UrlParserinit in interface UrlParserretrofitUrlManager - RetrofitUrlManager