cef_urlrequest.h questions

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

cef_urlrequest.h questions

Postby payalord » Sun Apr 22, 2018 12:29 am

I have several questions about cef_urlrequest.h and about how is better to organize approach I'm trying to achieve.

What I need is to make multiple separated requests to website. With ability to be able to save it's own cookies per each request and:
1) to run the requested website javascript on the pages, after those pages is loaded.
2) to do not run javascript but just get the page source and that's it.

So the question is cef_urlrequest can save cookies or not?
Is it possible with cef_urlrequest run javascript code on the page that is requested or not?

As I understand if with cef_urlrequest is not possible to run javascript on the page, then I need to use full cef browser and make request from it to the page.
payalord
Techie
 
Posts: 21
Joined: Sun Jan 07, 2018 8:21 am

Re: cef_urlrequest.h questions

Postby magreenblatt » Sun Apr 22, 2018 6:23 am

CefURLRequest can optionally save cookies. It does not execute JavaScript.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm

Re: cef_urlrequest.h questions

Postby HarmlessDave » Mon Apr 23, 2018 11:22 am

To run JavaScript you can open another browser window but make it hidden / invisible.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: cef_urlrequest.h questions

Postby payalord » Mon Apr 23, 2018 2:38 pm

Ok, thanks guys. But one more question about CefURLRequest. Is it multi-threaded and runs async?
payalord
Techie
 
Posts: 21
Joined: Sun Jan 07, 2018 8:21 am

Re: cef_urlrequest.h questions

Postby magreenblatt » Mon Apr 23, 2018 10:27 pm

It runs async. From the documentation:

URL requests can be created on any valid CEF thread in either the browser or render process. Once created the methods of the URL request object must be accessed on the same thread that created it.
magreenblatt
Site Admin
 
Posts: 12407
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 23 guests