User Guide
The HTTP API 35
Arguments
callbackFunc, URL, {serverScriptsFolder}
■ The callbackFunc argument is the JavaScript function to call when the HTTP request is
complete.
■ The URL argument is an absolute URL on a web server; if http:// is omitted from the
URL, Dreamweaver assumes HTTP protocol.
■ The serverScriptsFolder argument is an optional string that names a particular
folder—relative to the Configuration folder on the application server—from which you
want to retrieve server scripts. To retrieve the scripts, Dreamweaver uses the appropriate
transfer protocol (such as FTP, WebDAV, or Remote File System). Dreamweaver retrieves
these files and passes them to the function that
callbackFunc identifies.
If an error occurs, Dreamweaver MX reports it in the
statusCode property of the
returned object.
MMHttp.postText()
Availability
Dreamweaver UltraDev 4, enhanced in Dreamweaver MX.
Description
Performs an HTTP post of the specified data to the specified URL. Typically, the data
associated with a post operation is form-encoded text, but it could be any type of data that the
server expects to receive.
Arguments
URL, dataToPost, {contentType}, {serverScriptsFolder}
■ The URL argument is an absolute URL on a web server; if http:// is omitted from the
URL, Dreamweaver assumes HTTP protocol.
■ The dataToPost argument is the data to post. If the third argument is "application/x-
www-form-urlencoded"
or omitted, dataToPost must be form-encoded according to
section 8.2.1 of the RFC 1866 specification (available at www.faqs.org/rfcs/
rfc1866.html).
■ The contentType argument, which is optional, is the content type of the data to post. If
omitted, this argument defaults to
"application/x-www-form-urlencoded".
000_DW_API_Print.book Page 35 Wednesday, July 20, 2005 11:58 AM