Vely logo install examples
documentation about

14.2.0 released on Nov 29, 2022

request-body



PURPOSE:


Get the body of an HTTP request.

SYNTAX:



request-body <request body> [ length [ define ] <body length> ]


DESCRIPTION:


request-body stores the request body of an HTTP request into string <request body> which can hold text or binary data and which is created for that purpose. In either case, optional "length" clause provides the length in bytes of the body in <body length> variable, which can be created with optional "define".

If the content type of the request is "multipart/form-data", the request body is empty because all the data (including any attached files) can be obtained by using input-param (see file_uploading for files). In all other cases, request body is available.

Typical use of request-body is when some text or binary information is attached to the request, such as JSON for example, though it can be anything else, for example an image, some text, or a PDF document. Usually request body is present for POST, PUT or PATCH requests, but you can also obtain it for GET or DELETE requests, if supplied (for instance identifying a resource may require more information than can fit in a query string).

EXAMPLES:


String variable "reqb" will hold request body of a request and "reqb_length" will be its length in bytes:

request-body reqb length define reqb_length


SEE ALSO:


Request information ( get-req   input-param   request-body   set-req   url-param  )  SEE ALL (documentation)



Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Some icons copyright PaweĊ‚ Kuna licensed under MIT. Vely elephant logo copyright DaSoftver LLC. This web page is licensed under CC-BY-SA-4.0.