Witajcie,
Temat wydaje się mega prosty artykułów jest od groma na neci ale mimo wszystko utknąłem. Mamy najprostszy na świecie kod:
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,
StdCtrls, IdAuthenticationDigest;
type
TForm1 = class(TForm)
Button1: TButton;
IdHTTP1: TIdHTTP;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
IdHTTP1.Request.Username := 'admin';
IdHTTP1.Request.Password := 'xxx';
IdHTTP1.Get('http://ADRES_IP/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=1&arg1=0.2&arg2=0&arg3=0');
end;
zgodnie z wytycznymi znalezionymi na necie dodałem IdAuthenticationDigest ale mimo wszystko dostaję
HTTP/1.1 401 Unauthorized.
co ciekawe to przy użyciu postmana:
działa poprawnie.
Możecie coś podpowiedzieć? Delphi 2010 niestety :(
- screenshot-20211105092926.png (106 KB) - ściągnięć: 10