Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IdHTTP1:= TIdHttp.Create(Application);
- IdHTTP1.ConnectTimeout:= 10000;
- IdHTTP1.Request.Clear;
- IdHTTP1.Request.BasicAuthentication:= true;
- IdHTTP1.Request.Authentication.Username := Username;
- IdHTTP1.Request.Authentication.Password := Password;
- try
- IdHTTP1.Get(PbxURL);
- HttpCode := IdHTTP1.ResponseCode;
- except
- on E: EIdHTTPProtocolException do
- HttpCode := IdHTTP1.ResponseCode;
- IdHTTP1:= TIdHttp.Create(Application);
- IdHTTP1.ConnectTimeout:= 10000;
- IdHTTP1.Request.Clear;
- IdHTTP1.Request.BasicAuthentication:= true;
- IdHTTP1.Request.UserName := UserName;
- IdHTTP1.Request.Password := Password;
Add Comment
Please, Sign In to add comment