HTTP Session Object
The httpSession object allows developers to make remote HTTP requests to another website or web service. It maintains any cookies that the remote application returns, as well as deserializes WDDX and JSON responses into native CFML.
Example Usage:
if ( StructKeyExists(session, 'httpSession') ) { session.httpSession = $.getBean('httpSession'); session.httpSession.setHost('example.com'); // The default port is 80 session.httpSession.setPort(8082); };
You can send data as POST variables:
myPostData = { fname = 'John' , lname = 'Doe' }; theResponse = session.httpSession.post( '/user-service/' , myPostData );
Or you can send data as GET variables:
myGetData = { fname = 'John' , lname = 'Doe' }; theResponse = session.httpSession.get( '/user-service/' , myGetData );