GET HTTP BODY

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004


GET HTTP BODY (body)

ParameterTypeDescription
bodyBLOB | TextBody of the HTTP request

Description

The GET HTTP BODY command returns the body of the HTTP request being processed. The HTTP body is returned as is, without processing or parsing.

This command only operates in non-contextual mode. It can be called using a Web database method (On Web Authentication Database Method, On Web Connection Database Method) or any Web method executed in non-contextual mode.

In body, you can pass a variable or a field of the BLOB or Text type. Keep in mind that it is generally preferable to use the BLOB type since the number of characters is not limited. The Text type, on the other hand, is limited to 32,000 characters; if you exceed this amount, any excess data received will be truncated.

This command allows you, for example, to carry out queries in the body of requests. It also permits advanced users to set up a WebDAV server within a 4th Dimension database.

Example

In this example, a simple request is sent to the 4th Dimension Web server and the contents of the HTTP body are displayed in the debugger. Here is the form sent to the 4th Dimension Web server, as well as the corresponding HTML code:

Here is the Test4D2004 method:

   C_BLOB($request)
   C_TEXT($requestText)

   GET HTTP BODY($request)
   $requestText:=BLOB to text($request;Text without length)
   SEND HTML FILE("page.html")

Note: This method is declared "Available through 4DACTION, 4DMETHOD and 4DSCRIPT" in its properties.

When the form is submitted to the Web server, the $requestText variable receives the text of the HTTP request body.

See Also

GET HTTP HEADER.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next