Open CPT-CJS opened 4 years ago
代码如下 Map<String, String> extraHeaders = new HashMap<String, String>(); extraHeaders.put("Referer", ""); extraHeaders.put("Host", host); String ip = HttpDNS.getIpByHostAsync(host); if (!TextUtils.isEmpty(ip)) { String newUrl = StringRegular.urlWithIp(currentUrl, ip); view.loadUrl(newUrl, extraHeaders); }
跟了一波webview源码没找到原因,功力不够,求解
代码如下 Map<String, String> extraHeaders = new HashMap<String, String>(); extraHeaders.put("Referer", ""); extraHeaders.put("Host", host); String ip = HttpDNS.getIpByHostAsync(host); if (!TextUtils.isEmpty(ip)) { String newUrl = StringRegular.urlWithIp(currentUrl, ip); view.loadUrl(newUrl, extraHeaders); }
跟了一波webview源码没找到原因,功力不够,求解