bir*_*rdy 5 ajax android webview http-headers webviewclient
我已经重写public WebResourceResponse shouldInterceptRequest(WebView webView, String url),它应该根据Ajax功能的请求返回自定义响应。但是看起来WebResourceResponse只包含响应体。我如何传递像这样的HTTP响应:
HTTP/1.1 202
Cache-Control: no-cache
Custom-param: param
Run Code Online (Sandbox Code Playgroud)
给我WebView?
从 Android API 21 开始,WebResourceResponse.html#setStatusCodeAndReasonPhrase()和WebResourceResponse.html#setResponseHeaders()方法可用。
| 归档时间: |
|
| 查看次数: |
819 次 |
| 最近记录: |