At the moment WebKitURISchemeRequest can access HTTP headers and methods but not the body. I would like to help add the body-getter for this type. It looks like we can call ResourceRequest::updateSoupMessageBody to get the body. However, its parameters require a type BlobRegistryImpl&. I'm not sure how do I get this. Can I just call blobRegistry() and then pass to it?
You'd probably need to revert https://commits.webkit.org/260252@main... better talk to Carlos Garcia about this.
That commit doesn't seem to affect ResourceRequest::updateSoupMessageBody. This method also calls methods from ResourceRequestBase itself. Or is there somewhere else that will make its body missing when calling updateSoupMessageBody?
It's impossible to get the message body outside the network process because it's not serialized anymore. ResourceRequest::updateSoupMessageBody is not a way to get the message body.
I left some comments on the upstream Tauri bug for this: https://github.com/tauri-apps/wry/issues/666 My general feeling was also that this is tricky or impossible to do efficiently.
For custom uri schemes, it's the application the one providing the http body from the UI process, so I don't understand why you need a way to get it again.
(In reply to Carlos Garcia Campos from comment #5) > For custom uri schemes, it's the application the one providing the http body > from the UI process, so I don't understand why you need a way to get it > again. It could be asking users to fill a form with POST method. Without HTTP body, we can't get the data from the form. It's common to send requests with the body containing some data IMHO. Btw I tried to test a bit, and it seems the httpBody of the ResourceRequest is still valid when calling the URI scheme callback. Take above form as an example, I can get "name=John" if users type the name into the form. I suppose it's still possible to create a soup message body from it? Or should it just transfer the ownership into the callback?
Pull request: https://github.com/WebKit/WebKit/pull/10714
Committed 260949@main (5fe923aa166a): <https://commits.webkit.org/260949@main> Reviewed commits have been landed. Closing PR #10714 and removing active labels.