Open GoogleCodeExporter opened 9 years ago
You can do this probably only by modifying the source of OpenWebKitSharp. Look
inside the frameLoadDelegate events and find the one that corresponds to the
time just before the request is sent. Then, use request.setHeader to add the
header you want. Alternatively, you can look inside WebResourceLoadDelegate.cs
and find the willSendRequest method. Inside it, before the lines return req;
and return request; modify the request according to your own needs. This will
change the headers of all request sent for all resources though.
Original comment by tsumalis96@gmail.com
on 9 Oct 2012 at 3:52
Hi. i am in the same situation. Also, how do you get the cookies to be inserted
in subsecuent requests?
Original comment by labo...@gmail.com
on 21 Oct 2012 at 6:50
Fixed, it was simple. You have to tell the request to handle the cookies. You
have a WebKit.Interop.IWebURLRequest, convert it to its mutable version so you
can use the proper method:
WebKit.Interop.WebMutableURLRequest mutableRequest = request.mutableCopy();
mutableRequest.setHTTPShouldHandleCookies(1);
request = mutableRequest;
Original comment by labo...@gmail.com
on 21 Oct 2012 at 10:54
Original issue reported on code.google.com by
srinu.ka...@gmail.com
on 9 Oct 2012 at 2:18