如何从webViewClient.shouldInterceptRequest()返回Http错误响应?

时间:2013-12-20 17:28:52

标签: android ajax 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

到我的WebView

1 个答案:

答案 0 :(得分:0)