CEF4 is not getting header value
Posted: Wed Jun 03, 2020 11:31 pm
there is a procedure that worked in an earlier version of CEF4Delphi that stopped working in that version.
the code passes a customized header with login and password data.
that the page takes from the header and automates the entry on the page.
Request := TCefRequestRef.New;
Request.Url := 'https://reds.cfconnect.com/user/acao/W9';
Request.Method := 'GET';
sUsuario := "loginFlex:password123"
Header := TCefStringMultimapOwn.Create;
Header.Append('Authorization', 'Flexmobile ' + sUsuario);
Header.Append('ShowToolbar', 'false');
Request.SetHeaderMap(Header);
oFormWeb.UrlRequest := Request;
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
protected
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEFBROWSER_CREATED;
procedure TForm.BrowserCreatedMsg(var aMessage: TMessage);
begin
CEFWindowParent1.UpdateSize;
if UrlString <> EmptyStr then
wb.LoadURL(UrlString)
else
wb.Browser.MainFrame.LoadRequest(UrlRequest);
end;
But in the last version it stopped working
Has it changed the way to do this? or is it some mistake?
Best regards
Lenin
the code passes a customized header with login and password data.
that the page takes from the header and automates the entry on the page.
Request := TCefRequestRef.New;
Request.Url := 'https://reds.cfconnect.com/user/acao/W9';
Request.Method := 'GET';
sUsuario := "loginFlex:password123"
Header := TCefStringMultimapOwn.Create;
Header.Append('Authorization', 'Flexmobile ' + sUsuario);
Header.Append('ShowToolbar', 'false');
Request.SetHeaderMap(Header);
oFormWeb.UrlRequest := Request;
xxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
protected
procedure BrowserCreatedMsg(var aMessage : TMessage); message CEFBROWSER_CREATED;
procedure TForm.BrowserCreatedMsg(var aMessage: TMessage);
begin
CEFWindowParent1.UpdateSize;
if UrlString <> EmptyStr then
wb.LoadURL(UrlString)
else
wb.Browser.MainFrame.LoadRequest(UrlRequest);
end;
But in the last version it stopped working
Has it changed the way to do this? or is it some mistake?
Best regards
Lenin