Git Product home page Git Product logo

Comments (6)

xiubojin avatar xiubojin commented on May 18, 2024

是不是利用NSURLProtocol拦截WebView所有请求了?
如果是的话就会造成这种问题。

另外,不知道你想解决什么问题?

from jxbwkwebview.

ipad4 avatar ipad4 commented on May 18, 2024

是开启NSURLProtocol了,这个库也是没有解决这个问题吗。我想解决wkwebview加载网页时根据网络请求判断本地离线资源包中是否存在相应资源(比如jquery等公共资源),然后从本地读取资源文件,回传给wkwebview展示

from jxbwkwebview.

xiubojin avatar xiubojin commented on May 18, 2024

开启NSURLProtocol拦截请求,post请求的body必然会丢失的,我这个库只在首次是post请求的时候解决了这个问题,实现代码都在loadPostRequest方法里,你可以参照这个对其他post请求进行修改。

from jxbwkwebview.

ipad4 avatar ipad4 commented on May 18, 2024

首次是post请求,这个应用场景能具体讲讲吗,一般打开网页貌似用不上呀

from jxbwkwebview.

xiubojin avatar xiubojin commented on May 18, 2024

WKWebView指南
看post请求那一节

from jxbwkwebview.

hatjs880328s avatar hatjs880328s commented on May 18, 2024

H5页面中的ajax请求,我们根本就拦截不到吧。使用urlprotocol的时候body已经是null了。
你文章中说将body当做header存起来,并且将http更改为post是在这里处理吗?
谢谢回答。

from jxbwkwebview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.