try
TempHeaderMap := TCefStringMultimapOwn.Create;
request.GetHeaderMap(TempHeaderMap);
TempHeaderMap.Append('Accept-Encoding', 'gzip, deflate');
TempHeaderMap.Append('TEST', '1');
request.SetHeaderMap(TempHeaderMap);
finally
TempHeaderMap := nil;
end;
The addition works well, but
I don't know how to delete a specific header name.
TempHeaderMap.Append('TEST', '1'); << Clear
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
How to clear header?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to clear header?
Create a new TCefStringMultimapOwn, copy the rest of the headers, Append your own header and then call the SetHeaderMap method with the new TCefStringMultimapOwn instance.
See this example :
https://github.com/salvadordf/CEF4Delphi/blob/5ae265e9d3ce7076bda56c6429a642d5c76b83ef/demos/Delphi_VCL/OAuth2Tester/uOAuth2TesterFrm.pas#L359
See this example :
https://github.com/salvadordf/CEF4Delphi/blob/5ae265e9d3ce7076bda56c6429a642d5c76b83ef/demos/Delphi_VCL/OAuth2Tester/uOAuth2TesterFrm.pas#L359
Re: How to clear header?
Thank you. I solved it.
Also Do Not Track (DNT)
DNT = 1
What is the way to get rid of this?
Also Do Not Track (DNT)
DNT = 1
What is the way to get rid of this?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to clear header?
Set TChromiumCore.DoNotTrack to False.
Re: How to clear header?
Thank you, dear Salvadoffs.
♥♥♥♥♥♥
Third-party cookie will be blocked. Learn more in the Issues tab. <<<
Is there any way to solve that problem?


Third-party cookie will be blocked. Learn more in the Issues tab. <<<
Is there any way to solve that problem?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: How to clear header?
Set TChromiumCore.Block3rdPartyCookies to False.