Unfortunately, I think the easiest way to get this done is by using a custom scheme handler, where you basically override the default HTTP handler. I did something similar some week ago to get NTLM/Kerberos authentication working properly (because of stupidity with Microsoft Reporting Services...).Check the CefSharp.Example project for a sample scheme handler.
Unfortunately, I think the easiest way to get this done is by using a custom scheme handler, where you basically override the default HTTP handler. I did something similar some week ago to get NTLM/Kerberos authentication working properly (because of stupidity with Microsoft Reporting Services...).
My idea was that you would perform the request yourself (using a SchemeHandler); i.e. send the request to the remote using a WebClient or similar. This is a bit of work, but it can clearly be done; I've done it myself a few weeks ago.
However, your idea with the CefRequest->SetPostData() might be a simpler and better way in this case. Please feel free to investigate it further and submit a pull request, and we can then try to get it incorporated into the main repo.
Sorry to hear about your trouble. What errors do you get when you try to run the samples? Are you using VS2010 or 2012?
Yes, I guess so. You should probably not ignore postdata == nullptr though, but instead clear the body or something like that.
But yeah, I guess something quite close to this could work (but to be honest, I really don't know so much about the CEF internals in this area).
CefString cefStr = "gurka";
const wchar_t* wcharStr = cefStr.c_str();
auto charStr = (char*)malloc(256); // note! must deallocate at some point...
wcstombs(charStr, wcharStr, 256);
Of course, the point about the deallocation is also quite crucial. :)
...so if the bytes are copied, we should be safe. I believe your code is good, from how I understand it.
Yes, a pull request for this would be nice & appreciated! :) You don't have to provide an example, but of course I wouldn't mind if you do...As for a reliable server for testing POST requests - this one seems nice! http://httpbin.org/postThey have a plethora of other test URLs we could possibly also benefit from if/when we need.
This is trivial to fix on our end. We can just set up
a test page as an embedded resource (using the custom scheme handler and just put a <form> there, which posts to httpbin. Do you see what I mean?
Regarding 1.25.5, it's out; I just haven't updated GitHub and added binaries. I needed it for work (the fixed drop down issue), so that's why it got done. But we can definitely release 1.25.6 ASAP, there might also be other people who have something neat coming up? :)
--
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/5d7x27Nb_TA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/groups/opt_out.
Did you manage to make a PR out of this? Let us know if you need any assistance in doing so.
Will this ever be included into a CefSharp release? It would be nice if the IRequest had a setter on the Body property.