Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

body被清空 #130

Open
WlandRoy opened this issue May 22, 2020 · 2 comments
Open

body被清空 #130

WlandRoy opened this issue May 22, 2020 · 2 comments

Comments

@WlandRoy
Copy link

我用了最新的代码,但是每次web那边的POST请求body都为nil,请教这是怎么回事

@Dongqing123
Copy link

我也有一样的问题 是使用了wkwebview但是不知道如何解决,请帮助

@daydayfree
Copy link
Contributor

@WlandRoy @Dongqing123
wkwebview 在使用 nsurlprotocol 截获 post 请求后,body 会被清空,目前比较通用的解决办法是把 post 请求转为 get请求,客户端截获到 get 请求之后使用 urlconnection 或者 urlsession 包装成 post 请求再转发出去。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants