User Guide

36 The HTTP API
The serverScriptsFolder argument is an optional string that names a particular
folder—relative to the Configuration folder on the application server—to which you want
to post the data. To post the data, Dreamweaver uses the appropriate transfer protocol
(such as FTP, WebDAV, or Remote File System).
If an error occurs, Dreamweaver reports it in the
statusCode property of the returned object.
Example
In the following example of an MMHttp.postText() function call, assume that a developer
has placed the myScripts.cfm file in a folder named DeployScripts, which is located in the
Configuration folder on the local computer:
MMHttp.postText(
"http://ultraqa8/DeployScripts/myScripts.cfm",
"arg1=Foo",
"application/x-www-form-urlencoded",
"Configuration/DeployScripts/"
)
When Dreamweaver executes this function call, the following sequence occurs:
1. The myScripts.cfm file in the Configuration/DeployScripts folder on the local computer is
copied to another folder named DeployScripts, which is a subfolder of the root folder on
the ultraqa8 website. To deploy the files, Dreamweaver uses the protocol specified in the
site configuration properties.
2. Dreamweaver uses HTTP protocol to post the arg1=Foo data to the web server.
3. As a result of the post request, the web server on ultraqa8 executes the myScripts.cfm script
using the
arg1 data.
MMHttp.postTextCallback()
Availability
Dreamweaver UltraDev 4, enhanced in Dreamweaver MX.
Description
Performs an HTTP post of the text to the specified URL and passes the reply from the server
to the specified function. 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.
000_DW_API_Print.book Page 36 Wednesday, July 20, 2005 11:58 AM