CFHTTP in Pure CFScript

Figured this out while I was working on my Coldfusion Twitter API component. I haven’t been able to find any examples elsewhere, so I thought I would post it here for others.

<cfscript>
  myHttp = new Http(url="http://www.google.com", method="get");
  myHttpResult = myHttp.send().getPrefix();
</cfscript>
<cfdump var="#myHttpResult#">
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Technorati
  • Twitter
This entry was posted in Coldfusion 9 and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">