[AWS] Reading the body of a POST as a String
Phil Costin
philcostin at hotmail.com
Fri Jun 3 09:26:33 CEST 2011
> Date: Fri, 3 Jun 2011 09:06:00 +0200
> From: pascal at obry.net
> To: philcostin at hotmail.com
> CC: aws at lists.adacore.com
> Subject: Re: [AWS] Reading the body of a POST as a String
>
>
> Phil,
>
> > Thanks Pascal - I have tried this function before but gnat did not seem
> > to recognise that overload (the one which accepts a parameter of
> > AWS.Status.Data and returns a String or an Unbounded_String) - I may
> > have an error elsewhere though so it's probably something simple.
>
> I see, that's because it is overloaded and can be ambiguous in some
> cases, but for this you can use a qualified expression:
>
> MB : constant String := String'(AWS.Response.Message_Body (R));
>
> Or if you have two procedure:
>
>
> procedure P (M : String);
> procedure P (M : Unbounded_String);
>
> P (String'(AWS.Response.Message_Body (R)));
>
> Note that if the message body is expected to be large it is better to
> use the Unbounded_String version to avoid a stack overflow.
>
> Pascal.
Great, this is just what I was looking for, thanks again!
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/aws/attachments/20110603/1360e928/attachment.htm
More information about the AWS
mailing list