Cef3, How should I read the body text of the Response object ? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- loaded · 2020-01-04 11:05 Hi All I can get header information for Response object. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm_Main.Chromium1ResourceResponse(Sender: TObject;  browser: ICefBrowser; frame: ICefFrame; request: ICefRequest;  response: ICefResponse; out Result: Boolean); var i:integer; headerMap:ICefStringMultimap;begin  headerMap := TCefStringMultimapOwn.Create;  response.GetHeaderMap(headerMap);  if headerMap.Size <> 0 then for i := 0 to headerMap.Size - 1 do memo1.lines.add(PWideChar(headerMap.Key[i] + ': ' + headerMap.Value[i]));  Result:=false;end;  But; I couldn't reach the body text. Is there an easier way to do this ? ---------------------------------------------------------------------- salvadordf · 2020-01-04 11:46 Hi, First of all, sorry for asking you to move your question to this forum but the official CEF forum only has generic questions or library building issues. Questions about CEF wrappers (C#, python, pascal, etc) are usually moved to their forums. I assume you are using fpCEF3 and I'm not the maintainer of that project but I'll try to give you an answer. To get the HTML from a page you need to use a "string visitor" like TCefFastStringVisitor (cef3own.pas) TCefFastStringVisitor is used by frame.GetSource and that function is asynchronous. The visitor is executed in a CEF thread and it uses a custom procedure to receive the HTML. All you need to do is create a TCefFastStringVisitor instance and set the custom procedure as a parameter for the constructor. Remember that the custom procedure is executed in a CEF thread and you may have problems if you modify windows controls outside the main application thread. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure CallbackSource(const str: ustring);begin    //Do some work with the HTML sourceend; procedure TForm1.GetHTML;var CefStringVisitor:ICefStringVisitor;begin    CefStringVisitor := TCefFastStringVisitor.Create(CallbackSource);  // FPC might need an "@" before the CallbackSource     frame.GetSource(CefStringVisitor);end;  I saw that you use an outdated CEF version (Cef3 3.3029.1) I would recommend that you update to the latest fpCEF version available. ---------------------------------------------------------------------- loaded · 2020-01-04 12:01 salvadordf thank you very much for your reply. Looks like I'm gonna have to do some trial and error.