From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: AWS: what is the difference between Response.Acknowledge and Response.Build ? Date: Mon, 03 Nov 2014 18:16:38 +0100 Organization: Home - http://www.obry.net Message-ID: <1415034998.3986.135.camel@obry.net> References: Reply-To: pascal@obry.net NNTP-Posting-Host: 6wOF2OPkSxcUxdH8O2kKdQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Complaints-To: abuse@aioe.org X-Mailer: Evolution 3.12.7-1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:23000 Date: 2014-11-03T18:16:38+01:00 List-Id: Hello Natasha,=20 > I have little question about these functions in AWS.Response: >=20 > function Build > (Content_Type : String; > Message_Body : String; > Status_Code : Messages.Status_Code :=3D Messages.S200; > Cache_Control : Messages.Cache_Option :=3D Messages.Unspecified= ; > Encoding : Messages.Content_Encoding :=3D Messages.Identity) > return Data > with Post =3D> not Is_Empty (Build'Result); > -- Return a message whose body is passed into Message_Body. The > -- Content_Type parameter is the MIME type for the message > -- body. Status_Code is the response status (see Messages.Status_Code > -- definition). >=20 >=20 > function Acknowledge > (Status_Code : Messages.Status_Code; > Message_Body : String :=3D ""; > Content_Type : String :=3D MIME.Text_HTML) return Data > -- Returns a message to the Web browser. This routine must be used to > -- send back an error message to the Web browser. For example if a > -- requested resource cannot be served a message with status code S40= 4 > -- must be sent. >=20 > What is exactly the difference between `Build (Type_Str, Body_Str, S404);= ` > and `Acknowledge (S404, Body_Str, Type_Str);` ? If I rememeber correctly these two calls are 100% equivalent. But the Acknowledge as different default parameter making it easier to use when replying: return Acknowledge (S404); > What is an "error message"? Does it include 3xx HTTP codes? The message displayed by the Web browser. --=20 Pascal Obry / Magny Les Hameaux (78) The best way to travel is by means of imagination http://v2p.fr.eu.org http://www.obry.net gpg --keyserver keys.gnupg.net --recv-key F949BD3B