Re: Unable to set referer
Posted: Sat Aug 22, 2020 12:10 pm
2623
The forum for BriskBard users and CEF4Delphi / WebView4Delphi / WebUI4Delphi / WebUI4CSharp developers
http://www.briskbard.com/forum/
Буду очень благодарен, если поделитесь ссылкой. Не могу найти и всё...
I have installed this component and now there are too many errors and no documentation.salvadordf wrote: Sat Aug 22, 2020 3:05 pm OldCEF4Delphi with the 2623 branch of CEF is here :
https://github.com/salvadordf/OldCEF4Delphi
Code: Select all
map: ICefStringMultimap
Request: ICefRequest;
Header: ICefStringMultimap;
Code: Select all
map := ICefStringMultimapOwn.Create;
Request := TCefRequestRef.New;
Header := TCefStringMultimapOwn.Create;
Code: Select all
CefSingleProcess
CefUserAgent
CefLocale
CefUserDataPath
CefCache
CefAcceptLanguageList:='ru';
TCefCookieManagerRef.Global(CefBack);
.SetStoragePath(CookiesPath, True, CefBack);
Now you can use the TChromium.CustomHeaderName and TChromium.CustomHeaderValue properties to set HTTP headers easily.andreykrasnodar wrote: Sun Aug 23, 2020 8:59 amI have installed this component and now there are too many errors and no documentation.salvadordf wrote: Sat Aug 22, 2020 3:05 pm OldCEF4Delphi with the 2623 branch of CEF is here :
https://github.com/salvadordf/OldCEF4Delphi
For example, I have varables, in cef3 I wroteCode: Select all
map: ICefStringMultimap Request: ICefRequest; Header: ICefStringMultimap;
What is now?Code: Select all
map := ICefStringMultimapOwn.Create; Request := TCefRequestRef.New; Header := TCefStringMultimapOwn.Create;
Many of those variables are now properties of GlobalCEFApp.andreykrasnodar wrote: Sun Aug 23, 2020 9:18 am Also
Code: Select all
CefSingleProcess CefUserAgent CefLocale CefUserDataPath CefCache CefAcceptLanguageList:='ru'; TCefCookieManagerRef.Global(CefBack); .SetStoragePath(CookiesPath, True, CefBack);
Great! It works. Thanks.salvadordf wrote: Sun Aug 23, 2020 9:30 am Many of those variables are now properties of GlobalCEFApp.
Use GlobalCEFApp.SingleProcess, GlobalCEFApp.UserAgent, GlobalCEFApp.Locale, GlobalCEFApp.UserDataPath, GlobalCEFApp.Cache, GlobalCEFApp.AcceptLanguageList, GlobalCEFApp.Cookies, etc.
Code: Select all
Request.Url:='https://google.com';
request.Method:='GET';
request.SetReferrer('https://yahoo.com',REFERRER_POLICY_DEFAULT);
chromium2.Browser.MainFrame.LoadRequest(Request);
I think because request is not created.Access violation at address 006AF59D in module 'browser.exe'. Read of address 00000000.
Code: Select all
Request := TCefRequestRef.New;