Referencing Http Post Parameters In The Cf.http Function; Using The Cf.http Post Method - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Property
Statuscode

Referencing HTTP Post parameters in the CF.http function

To pass HTTP
Post
and assign this array to a variable named
an array of objects in the
Parameter
name
type
value
In the following example, the
objects:
function postWithParamsAndUser()
{
// Set up the array of Post parameters. These are just like cfhttpparam tags.
params = new Array();
params[1] = {name:"arg2", type:"URL", value:"value2"};
url = "http://localhost:8500/";
// Invoke with the method, url, params, username, and password
result = CF.http("post", url, params, "karl", "salsa");
return result.get("Filecontent");
}

Using the CF.http Post method

You use the
Post
ColdFusion page or CGI program for processing. For POST operations, you must use the
argument for each variable that you post. The
params
ColdFusion page or an executable that interprets the variables being sent, and returns data.
Description
HTTP error code and associated error string. Common HTTP status codes
returned in the response header include the following:
400: Bad Request
401: Unauthorized
403: Forbidden
404: Not Found
405: Method Not Allowed
parameters in the
CF.http
argument of the
params
Description
The variable name for data that is passed
Transaction type:
• URL
• FormField
• Cookie
• CGI
• File
Value of URL, FormField, Cookie, File, or CGI variables that are passed
function passes HTTP
CF.http
method to send cookie, form field, CGI, URL, and file variables to a specified
function, you must construct an array of objects
. The following arguments can only be passed as
params
function:
CF.http
method passes data to a specified
Post
parameters in an array of
Post
Using the CF.http function
665

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents