Hi Jason,

Thank you for your response. Yet, I'm still stuck.

I am using:
------------------------------------------------------------------------
uses httpsend;

var
  sdata: TStringStream;
  url, urldata, response: string;
begin
  url     := <some_url>;
  urldata := <some_name_value_pairs>;
  sdata   := TStringStream.Create('');

  if HttpPostURL(url, urldata, sdata) then
    response := sdata.DataString
  else
    response := 'HttpPostURL failed';

  sdata.Free;

  { do something with the response here ... }

end;
------------------------------------------------------------------------

WHERE and how would I have to put the information, that I need a 'Host: ...'
and a 'Connection: close' in the header?

I see in the httpsend Unit that I should be able to set FKeepAlive (in
function THTTPSend.HTTPMethod(const Method, URL: string): Boolean;) to
FALSE, but where? I also see the line

   FHeaders.Insert(0, 'Host: ' + s);

but when I trace the output, no Host Header is to be seen...?

And, once again: Would it be sufficient to just set

   FProtocol := '1.1';

in constructor THTTPSend.Create to switch to HTTP 1.1 ?


My apologies if my questions reveal lack of deeper understanding of the
matter.

Best regards,
- Klaus -


----- Original Message ----- 
From: <jasonps...@jegas.com>
To: "Ararat Synapse" <synalist-public@lists.sourceforge.net>
Sent: Monday, October 01, 2012 10:20 PM
Subject: Re: [Synalist] Basic Question about HTTP 1.1 in Synapse httpsend


> You can control the headers quite explicitly with the string list that
> is sent when making a connection.
>
> The synalist http request example shows this list as a parameter. You
> can completely take over that. So understanding that you send this
> OBJECT which is a list of lines of text that become a header and
> understanding how to use the TSTRINGLIST I believe its called should
> help you.
>
> Good Luck man!
> --Jason
>
>
> -------- Original Message --------
> Subject: [Synalist] Basic Question about HTTP 1.1 in Synapse httpsend
> From: "Klaus Langner" <k...@cybercity.de>
> Date: Sun, September 30, 2012 11:31 am
> To: "Ararat Synapse" <synalist-public@lists.sourceforge.net>
>
>
> Hello,
>
> I am using HttpPostURL to communicate with Paypal. Paypal will soon
> require
> certain requests ("IPN") to be sent with HTTP 1.1 and to contain "Host:
> http://www.paypal.com"; and "Connection: close" in the HTTP header.
>
> I guess it will not be sufficient to just set
>
>  FProtocol := '1.1';
>
> in constructor THTTPSend.Create ?
>
> Any help on how to include/modify the Host and Connection data is
> greatly
> appreciated.
>
> Thanks,
> - Klaus -
>
> http://cybercity.de
>



------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to