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 of request in custom scheme handler #48

Open
kpko opened this issue Apr 22, 2013 · 3 comments
Open

Body of request in custom scheme handler #48

kpko opened this issue Apr 22, 2013 · 3 comments

Comments

@kpko
Copy link

kpko commented Apr 22, 2013

Hi,

I created a custom ISchemeHandler and implemented ProcessRequest. In my method, I want to use the request data sent from an AJAX-call (via POST). The request object doesn't have a property like "Body" or "Content". How do I get the POST data? Could you implement another property like "Body"?

@ataranto
Copy link
Owner

I'm not sure off the top of my head. I'd have to look at the CEF code and the CefSharp code and see if there's some body property that is available in CEF that we're not binding in CefSharp.

@kpko
Copy link
Author

kpko commented Apr 22, 2013

Hi,

I already found the piece of code which is responsible for the request itself. I'm very newish to c++, so you will have to modify my code a little bit.

Two major caveats on my code:

  1. Post-data is only sent on http/https-requests, so using your own scheme like "app://" won't work. I worked around it by overriding http:// with my custom scheme handler. This is a known issue/feature in webkit: https://code.google.com/p/chromiumembedded/issues/detail?id=404
  2. The PostData-object in Cef is able to hold multiple sets of data (mutipart forms...) This is great in 99% of the use cases I can think of. Maybe we could enhance it to be a little more flexible.

I will add a pull request.

@ataranto
Copy link
Owner

thank you!

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

2 participants