In my test I did remove the line Client.UserAgent := editUserAgent.Text;
So I was using the default Synapse UserAgent.

Ludo

-----Message d'origine-----
De : Felipe Monteiro de Carvalho [mailto:[email protected]] 
Envoyé : mercredi 13 avril 2011 13:02
À : Ararat Synapse
Cc : Lukas Gebauer
Objet : Re: [Synalist] Reading the HTTP headers of a page


Hello,

I suggest the patch attached to improve a little bit the documentation found
here: http://synapse.ararat.cz/doc/help/httpsend.THTTPSend.html#HTTPMethod

I eventually figured out what to put in the two parameters, but an example
would have helped.

On a different topic, I am doing this:

procedure TForm1.buttonReadHeadersClick(Sender: TObject);
var
  Client: THttpSend;
begin
  Client := THttpSend.Create;
  Client.UserAgent := editUserAgent.Text;
  Client.HttpMethod('GET', editURL.Text);
  Client.Document.Position := 0;
  memoHeaders.Lines.LoadFromStream(Client.Document);
  memoHeaders.Text := Client.Headers.Text + LineEnding + memoHeaders.Text;
  Client.Free;
end;

And it works fine for http://www.google.com

But I cannot get any HTML code from http://labb.comunidadumbria.com/foro/

Although Firefox displays it correctly. I tryed using the same UserAgent as
Firefox without success.

Any ideas?

thanks,
-- 
Felipe Monteiro de Carvalho


------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to