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

Putting <cfhttp> to Use

The <cfhttp> tag has unlimited uses—for example, it can be used as a simple request for a page, or as the cornerstone to a back-end agent that directs content to a user through email. Now that you have looked at the various attributes and syntax descriptions for the <cfhttp> tag, let's write some examples to demonstrate its various capabilities.

Using the GET Method

The first example demonstrates a simple GET operation. Listing 21.1 shows the CFML code necessary to use the <cfhttp> tag in a GET operation. This example fetches the index page from www.wired.com (a popular news site) and then displays the results.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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