Chapter 14. Interacting with Other Web Servers Using HTTP
One of ColdFusion’s
most powerful features is its ability to interact with other web
servers via the cfhttp
tag.
cfhttp
allows a ColdFusion application to perform
standard HTTP operations (Delete, Get, Head, Options, Post, Put, and
Trace) on remote servers. Using cfhttp
, you can
perform a wide range of functions, such as retrieving text and binary
files, reading the contents of delimited text files into query
objects, and posting information such as form-field data or XML to
forms and applications on remote servers. Some of the more common
uses include generating static HTML pages from dynamic data,
gathering content such as news articles and press releases from
remote sites, automatic form submissions, and intelligent agents
capable of interacting with remote services such as stock quote and
news feeds. For example, you can use cfhttp
to
write an agent that can gather information related to a particular
company from various services including news sources, search engines,
and financial service providers. The information gathered by the
agent can be presented to users in any number of ways such as in an
email, on a personalized web page, or even in an alphanumeric message
sent to a pager. The uses for the cfhttp
tag are
limited only by your imagination.
Because cfhttp
has the ability to grab content from remote sites, questions of copyright, trademark, and intellectual property infringement can come up. It is important ...
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.