Guest User

Untitled

a guest
Feb 12th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. IdHTTP1:= TIdHttp.Create(Application);
  2. IdHTTP1.ConnectTimeout:= 10000;
  3. IdHTTP1.Request.Clear;
  4. IdHTTP1.Request.BasicAuthentication:= true;
  5. IdHTTP1.Request.Authentication.Username := Username;
  6. IdHTTP1.Request.Authentication.Password := Password;
  7. try
  8. IdHTTP1.Get(PbxURL);
  9. HttpCode := IdHTTP1.ResponseCode;
  10. except
  11. on E: EIdHTTPProtocolException do
  12. HttpCode := IdHTTP1.ResponseCode;
  13.  
  14. IdHTTP1:= TIdHttp.Create(Application);
  15. IdHTTP1.ConnectTimeout:= 10000;
  16. IdHTTP1.Request.Clear;
  17. IdHTTP1.Request.BasicAuthentication:= true;
  18. IdHTTP1.Request.UserName := UserName;
  19. IdHTTP1.Request.Password := Password;
Add Comment
Please, Sign In to add comment