# CFHTTPPARAM

Required for CFHTTP POST operations, CFHTTPPARAM is used to specify the parameters necessary to build a CFHTTP POST.

### Syntax

    <CFHTTPPARAM NAME="name"
        TYPE="type"
        VALUE="transaction type"
        FILE="filename">

#### NAME

Required. A variable name for the data being passed.

#### TYPE

Required. The transaction type. Valid entries are:

- URL
- FormField
- Cookie
- CGI
- File

#### VALUE

Optional for TYPE="File". Specifies the value of the URL, FormField, Cookie, File, or CGI variable being passed.

#### FILE

Required for TYPE="File".

### Example

    <!--- This example shows the use of CFHTTPPARAM --->
    <HTML>
    <HEAD>
    <TITLE>CFHTTPPARAM Example</TITLE>
    </HEAD>

    <BODY bgcolor=silver>
    <H3>CFHTTPPARAM Example</H3>

    <P>This view-only example shows the use of CFHTTPPARAM
    to show the values of passed variables on another HTML
    reference, accessed by CFHTTP.  The other file
    could simply output the value of form.formtest,
    url.url_test, cgi.cgi_test, and
    cookie.cookie_test to prove that this page is working:

    <H3>Sample Other File Listing</H3>
    <CFOUTPUT>#HTMLCodeFormat("
    <HTML>
    <HEAD>
    <TITLE>Sample Page</TITLE>
    </HEAD>
    <BODY>
    <H3>Output the passed variables</H3>
    <CFOUTPUT>
    Form variable: ##form.form_test##
    <br>URL variable: ##URL.url_test##
    <br>Cookie variable: ##Cookie.cookie_test##
    <br>CGI variable: ##CGI.cgi_test##
    </CFOUTPUT>
    </BODY>
    </HTML>
    ")#</CFOUTPUT>

    <H3>For CFHTTPPARAM code, see right frame</H3>
    <!--- <P>
    <CFHTTP METHOD="POST" URL="http://localhost/someotherfile.cfm">
    <CFHTTPPARAM NAME="form_test" TYPE="FormField"
      VALUE="This is a form variable">
    <CFHTTPPARAM NAME="url_test" TYPE="URL" VALUE="This is a URL variable">
    <CFHTTPPARAM NAME="cgi_test" TYPE="CGI" VALUE="This is a CGI variable">
    <CFHTTPPARAM NAME="cookie_test" TYPE="Cookie" VALUE="This is a cookie">
    </CFHTTP>

    <CFOUTPUT>
            #CFHTTP.FileContent#
    </CFOUTPUT> --->

    </BODY>
    </HTML>