Re: IdHttp.Post not working with stringlist ?

Giganews Newsgroups
Subject: Re: IdHttp.Post not working with stringlist ?
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Tue, 16 Oct 2007

"Marcel Horsthuis" <marc…@horsthouse.nl> wrote in message
news:053ABB047239E340marc…@horsthouse.nl...

> I try to send an XML file with the idHTTP.Post method as follows.
<snip>

You should be sending XML as TStream instead of a TStrings.  Post() will
encode TStrings data in a way that can break XML.  Using a TStream instead
will send the XML as-is.

> When I compile the program I get the error :
>
> "E2250 There is no overloaded version of 'Post' that
> can be called with these arguments"

You are accessing the TStrings.Text property, so you are sending the XML as
a String instead of as a TStrings.  There is no version of Post() that
accepts input data as a String.

Gambit

Replies

None

In response to

IdHttp.Post not working with stringlist ? posted by Marcel Horsthuis on Tue, 16 Oct 2007