Return Xml document using Synapse HTTP GET lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- GagiMeister · 2015-11-20 07:15 I need help how to use synapse http get method with basic authentication, I have google searched about this method but didn't find any info about http get method with basic authentication. Reasponse should return xml data ---------------------------------------------------------------------- Leledumbo · 2015-11-20 07:40 It's very simple, once you have the username and password, simply concat them with ':', so you have username:password as one string. This string is then encoded using Base64. Prepend the encoded string with 'Authorization: Basic ' (without quotes of course, watch for space after Basic). Now send this complete string in the request header (search Synapse documentation on how to pass additional headers upon request). ---------------------------------------------------------------------- GagiMeister · 2015-11-20 12:23 I have put something like this: procedure TForm1.Button1Click(Sender: TObject); var URL: string;     Params: string;     Response: TMemoryStream;     r:THTTPSend; begin    r:=THTTPSend.Create;    r.UserName:='username';    r.Password:='password';    Response := TMemoryStream.Create;    URL:='URL OF THE WEB SERVICE';    r.HTTPMethod('GET',URL);    Memo1.Lines.Add(r.ResultString); end; In Memo1 I get just OK, probably status of the request. How can I retrieve data from request? I should get xml data. Ok I have figured it out how to retrieved xml data, I have just put: Response:=r.Document; Response.SaveToFile('c:\response.txt'); Here I just need to retrieve data from xml.