• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Posting Information

Besides allowing you to retrieve information, you can also post information to remote web sites with cfhttp. By setting the method attribute to Post, you can use cfhttp to pass information such as files, URLs, CGI variables, cookies, and form fields to other web applications, such as a ColdFusion page or CGI program, on a remote server. cfhttp post operations are considered two-way transactions because they pass variables to remote applications, which usually process the input and return data.

When performing cfhttp post operations, you have to specify an additional tag, cfhttpparam, for each value you are passing in the transaction. In other words, if you are using cfhttp to post two form-field variables to a remote form, you need to use two cfhttpparam tags in conjunction with the cfhttp tag. By specifying the variable type in each cfhttpparam tag, ColdFusion allows you to interact with applications that require multipart form data, such as cookies, text, and file fields, in the same operation. Note that cfhttpparam tags are always nested within a cfhttp tag. Here is the syntax for using the cfhttpparam tag:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint