• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. External Communications > Customizing HTTP Headers with addRequestH...

Customizing HTTP Headers with addRequestHeader()

New addRequestHeader() methods for the LoadVars class and the XML class allow you to add or change HTTP request headers. You can use these headers for a wide variety of standard purposes, such as telling the server what MIME content types (for example, text, video, audio) or character set the browser prefers or expects, or indicating what language you prefer (for servers supporting multiple languages). There are also special-purpose headers such as the SOAPAction header, which indicates the intent of a SOAP HTTP request. And you can define custom headers yourself.


Server scripting languages such as ColdFusion Markup Language (CFML), PHP, and ASP can be used to retrieve all headers. For example, in CFML you use the built-in GetHttpRequestData() function, like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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