4D v14.3

WEB GET HTTP BODY

Home

 
4D v14.3
WEB GET HTTP BODY

WEB GET HTTP BODY 


 

WEB GET HTTP BODY ( body ) 
Parameter Type   Description
body  BLOB, Text in Body of the HTTP request

The WEB 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 can be called using a Web database method (On Web Authentication Database Method, On Web Connection Database Method) or any Web method.

In body, you can pass a variable or a field of the BLOB or Text type. The Text type is generally sufficient (the body parameter can receive up to 2 GB of text).

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 4D database.

Example  

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

Here is the Test4D2004 method:

 C_BLOB($request)
 C_TEXT($requestText)
 
 WEB GET HTTP BODY($request)
 $requestText:=BLOB to text($request;UTF8 text without length)
 WEB SEND FILE("page.html")

Note: This method is declared “Available through 4D HTML tags and URLs (4DACTION...)” in its properties.

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

 
PROPERTIES 

Product: 4D
Theme: Web Server
Number: 814

 
HISTORY 

Created: 4D 2004
Renamed: 4D v13

 
SEE ALSO 

WEB GET BODY PART
WEB GET HTTP HEADER

 
ARTICLE USAGE

4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)

Inherited from : WEB GET HTTP BODY ( 4D v13.5)