C
chinazxy2008
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button2Click(Sender: TObject);var fs : TFileStream; url : String;begin url := '10.0.1.11'; url:='http://'+url+'/HnErpDownload/123.HN'; try fs := TFileStream.Create('d:/123.HN',fmCreate ); HttpClient.Request.BasicAuthentication := True ; HttpClient.Request.Username := 'raiseUser'; HttpClient.Request.Password := 'HnjtRaiseUser'; httpClient.get(url, fs); httpClient.Disconnect; fs.Free; except on e:exception do showmessage(e.message); end; //showMessage('ok');end;提示http/1.1 401 unauthorized。在IE中能够输入密码进行下载,请大家帮助一下