www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
http_body_read
soap_box_structure
soap_box_xml_entity
soap_call
soap_client
soap_current_url
soap_dt_define
soap_make_error
soap_print_box
soap_sdl
soap_server
soap_wsdl
soap_wsdl_import
wst_cli
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

http_body_read

Reads the HTTP body from the client HTTP connection and returns it as a string.
string http_body_read ();
Description

This function reads the HTTP body from the client HTTP connection and returns it as a string output. This is suitable for processing POST requests with bodies encoded differently than multipart/* and application/x-www-form-urlencoded as in SOAP requests where the POST body is encoded as text/xml).

Example
Reading a HTTP request entity body

Suppose we have the following HTTP request

POST /foo/bar.vsp HTTP/1.1
Content-Type: text/xml
Content-Length: ...

<document>abc</document>

The following VSP page will read the content and return an XML document back to the browser.

<?vsp
declare ses any;
ses := http_body_read ();
http_header ('Content-Type: text/xml\r\n');
http (string_output_string (ses));
?>