Hi,
This is true, as I actually use it as a string anyway, but I thought I saw some
other functions in synapse using StringList, so just tried to make it more
similar.
Either way, I think a similar function would be useful to add to the HTTPSend
unit.
Thank you,
Noah silva
On 2011/04/15, at 17:29, "Ludo Brands" <ludo.bra...@free.fr> wrote:
> Hi,
>
> the " Response.LoadFromStream(HTTP.Document);" is application specific.
> LoadFromStream uses line terminator to split strings and line terminators are
> undefined in HTTP. FE. HTML ignores them, XML depends on context, JSON
> ignores them between tokens, ...
>
> "function HttpPostText(const URL, URLData: string; const Response: string):
> Boolean; " would be more usefull. Then simply do the LoadFromStream in your
> application.
>
> Ludo
>
>
>
>
> -----Message d'origine-----
> De : Site Administrator [mailto:shir...@galapagossoftware.com]
> Envoyé : vendredi 15 avril 2011 03:43
> À : Ararat Synapse
> Objet : Re: [Synalist] Compiling with 64-bit FPC 2.5.1
>
> Hi,
>
> I tried sending this to the email listed on the official Synapse page before,
> but it seems that email address is no longer active:
>
> At any rate, I added the following to unit HttpSend:
> (I'll just paste it here since it's very short).
> ----------------------------
> //@002 2011.03.30 Noah Silva Added
> function HttpPostText(const URL, URLData: string; const Response: TStrings):
> Boolean;
> var
> HTTP: THTTPSend;
> begin
> HTTP := THTTPSend.Create;
> try
> WriteStrToStream(HTTP.Document, URLData);
> HTTP.MimeType := 'application/x-www-form-urlencoded';
> Result := HTTP.HTTPMethod('POST', URL);
> if Result then
> Response.LoadFromStream(HTTP.Document);
> finally
> HTTP.Free;
> end;
> end;
> ----------------------------
>
> This allows one to make a POST request and retrieve the results as a
> StringList (I needed this to get some XLM Data).
> (If there is another simple way, please let me know)
>
> Thank you,
> Noah Silva
>
> 2011/4/13 Lukas Gebauer <gebyl...@mlp.cz>
> > The attached patch makes synapse compile with 64-bit FPC 2.5.1.
> > It is made against synapse trunk.
> >
> > Juha Manninen
>
> Thank you, uploaded into SVN now.
>
>
>
> --
> Lukas Gebauer.
>
> http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
> http://geoget.ararat.cz/ - Geocaching solution
>
>
> ------------------------------------------------------------------------------
> 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
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public