rad*_*aun 4 android caching authorization retrofit
我正在尝试在我的应用程序中实现Retrofit,并且它正常工作,除了请求没有被缓存.
所以我有:
@GET("/mobile/api.php")
public void getPromos(
@QueryMap Map<String, String> options,
Callback<ResultPromotions> callBack);
Run Code Online (Sandbox Code Playgroud)
.....
requestFacade.addHeader("Authorization", authorizationValue);
requestFacade.addHeader("Cache-Control", "public, max-age=600");
Run Code Online (Sandbox Code Playgroud)
....
RestAdapter adapter = new RestAdapter.Builder()
.setRequestInterceptor(requestInterceptor)
.setClient(new OkClient(okHttpClient))
.setEndpoint(ENDPOINT)
.setConverter(new GsonConverter(gson))
.setLogLevel(RestAdapter.LogLevel.FULL)
.build();
Run Code Online (Sandbox Code Playgroud)
所以我的问题是:剂量改造缓存授权请求?或者无法缓存此类请求?
| 归档时间: |
|
| 查看次数: |
2277 次 |
| 最近记录: |