Developing ColdFusion Applications
|
|
Interacting with Remote Servers
|
Using cfhttp to Interact with the Web
The cfhttp
tag, which enables you to retrieve information from a remote server, is one of the more powerful tags in the CFML tag set. You can use one of two methods to interact with a remote server using the cfhttp
tag: Get or Post.
- Using the Get method, you can only send information to the remote server directly in the URL. This method is often used for a one-way transaction in which
cfhttp
retrieves an object.
- By comparison, the Post method can pass variables to a ColdFusion page or CGI program, which processes them and returns data to the calling page. The calling page then displays or further processes the data that was received. For example, when you use
cfhttp
to Post to another ColdFusion page, that page does not display. It processes the request and returns the results to the original ColdFusion page, which then uses the information as appropriate.
Copyright © 2001, Macromedia Inc. All rights reserved. |
|