Post

Posts the given data to the specified URL.

Note: Acrobat and Adobe Reader cannot verify that the form is certified until after the initialize event initiates. To use the Post function on certified forms prior to the form rendering, use the docReady event.

Syntax

Post(s1, s2 [, s3 [, s4 [, s5 ]]])

Parameters

Parameter

Description

s1

The URL to post to.

s2

The data to post.

If the function cannot post the data, it returns an error.

s3 (Optional)

A string containing the content type of the data to post. Here are valid content types:

  • application/octet-stream (default value)

  • text/html

  • text/xml

  • text/plain

  • multipart/form-data

  • application/x-www-form-urlencoded

  • Any other valid MIME type

If you do not include a value for s3, the function sets the content type to the default value. The application ensures that the data to post uses the correct format according to the specified content type.

s4 (Optional)

A string containing the name of the code page used to encode the data. Here are valid code page names:

  • UTF-8 (default value)

  • UTF-16

  • ISO-8859-1

  • Any character encoding listed by the Internet Assigned Numbers Authority (IANA)

If you do not include a value for s4, the function sets the code page to the default value. The application ensures that encoding of the data to post matches the specified code page.

s5 (Optional)

A string containing any additional HTTP headers to be included with the posting of the data.

If you do not include a value for s5, the function does not include an additional HTTP header in the post.

SOAP servers usually require a SOAPAction header when posting to them.

Examples

The following expressions are examples that use the Post function:

Expression

Returns

Post("http://tools_build/scripts/jfecho.cgi", 
"user=joe&passwd=xxxxx&date=27/08/2002", 
"application/x-www-form-urlencoded")

Posts some URL encoded login data to a server and returns that server's acknowledgement page.

Post("http://www.nanonull.com/TimeService/ 
TimeService.asmx/getLocalTime", "<?xml version='1.0' 
encoding='UTF-8'?><soap:Envelope><soap:Body> 
<getLocalTime/></soap:Body> 
</soap:Envelope>", "text/xml", "utf-8", 
"http://www.Nanonull.com/TimeService/getLocalTime")

Posts a SOAP request for the local time to some server, expecting an XML response back.

// Ethnio survey code removed