* * *

Author Topic: fpCef3 - changing user agent string  (Read 267 times)

laggyluk

  • Jr. Member
  • **
  • Posts: 55
fpCef3 - changing user agent string
« on: February 07, 2017, 12:52:04 pm »
I can set user agent while initializing application but I rather do that on the fly, without restart.

Stackoverflow says It should be possible to manipulate request header in OnBeforeResourcesLoad like that:

    CefRequest::HeaderMap hdrMap;
    request->GetHeaderMap(hdrMap);

    hdrMap.insert(std::make_pair("Test", "test"));
    request->SetHeaderMap(hdrMap);
    return false;

How to create this HeaderMap object?
dCef3 port has something like this:   headerMap := TCefStringMultiMapOwn.Create;
which I can't find in fpCef3, is it missing from the port or is named differently?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus