我正在使用Digest auth进行GET请求,但HTTP.Get
除外。
HTTP := TIdHTTP.Create;
try
HTTP.OnAuthorization := HTTPAuthorization;
HTTP.Request.Clear;
HTTP.HTTPOptions := HTTP.HTTPOptions + [hoInProcessAuth];
Memo1.Text := HTTP.Get(LabeledEdit1.Text);
ShowMessage('GOT!!!');
finally
HTTP.Free;
end;
该异常是EIdConnClosedGracefully。
HTTP.Response.ResponseCode
是401
HTTP.Response.ResponseText
是“连接已正常关闭”。
即使有这种异常,我如何获得响应正文?