CRAlpha / CRAlpha/react-native-wkwebview
HTTP POST request body is empty
- Dominant language
- Objective-C
- Stars
- 637
- Forks
- 263
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
First off, thanks for all the hard work. This module looks really promising!
Now over to the issue; for some reason it does not seem to work properly with HTTP POST requests. More specifically the POST-body seems to be missing from the request.
Basically what I've done is drop this module in place of the old WebView. The only change in my code is doing `import WKWebView from 'react-native-wkwebview-reborn';` and replacing my old `WebView` with `WKWebView`.
Setting the following as `source` on the old WebView works;
```javascript
source={
method: 'POST',
body: `samlResponse=${encodeURIComponent(saml)}`,
uri: authUrl
}
```
But it fails on this WKWebView module.
What I'm trying to do is POST an authentication SAML to a certain URL. Just setting a breakpoint in the code I can see that the properties are set on source:

But for some reason, the `samlResponse` is empty on the receiving endpoint. I've also checked with Charles Proxy that the POST-body is empty.
Seems like this might be a general problem with `WKWebView` though:
* [look here](https://bugs.webkit.org/show_bug.cgi?id=167131)
* [and here](https://forums.developer.apple.com/thread/18952)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.