io/ Gateway.js

This library gives the ability to directly communicate with a server using the XMLHTTPRequest object in a non-browser specific way.

Copyright

2004 Rob Rohan (robrohan@gmail.com)All rights reserved

Related

util/Collections.js

Summary
This library gives the ability to directly communicate with a server using the XMLHTTPRequest object in a non-browser specific way.
the library version
This creates a HTTPConnection factory that can produce http connetion object that are IE and Mozilla capable they can be used to GET and POST to a server It is oftend used in one go like: http = new HTTPConnectFactory().getInstance();
get an instace of the http connect object this actually just creates either an MS or Gecko type object.
This object handles sending.
loads the file and uses the call back function func_into(String) to pass in the files contents - can also be used to pass variables in the ?test=123&booga=123 format
This method implements a multi-field form submission via a POST, using the ‘fields’ object as a set of name:value pairs to pass as the form fields.
Does a simple post request, passing the bodyinfo as the body of the request - meaning the only way to get the bodyinfo out is to do #GetHttpRequestData().content# in coldfusion for example
This does a soap compliant request to a server

Variables

GATEWAY_VERSION

var GATEWAY_VERSION

the library version

HTTPConnectFactory

This creates a HTTPConnection factory that can produce http connetion object that are IE and Mozilla capable they can be used to GET and POST to a server It is oftend used in one go like: http = new HTTPConnectFactory().getInstance();

Returns

a factory to create xmlhttprequest objects with

Summary
get an instace of the http connect object this actually just creates either an MS or Gecko type object.

Functions

HTTPConnectFactory. getInstance

get an instace of the http connect object this actually just creates either an MS or Gecko type object.

Returns

An XMLHTTPRequest instance that should behave the same on all browsers

JSRemote

This object handles sending.  This can be used to send and receive data from the server

Parameters

connectionan XMLHTTPRequest object from the HTTPConnectFactory used to send and receive with
asynboolean for async or sync mode.  True means async false means sync
Summary
loads the file and uses the call back function func_into(String) to pass in the files contents - can also be used to pass variables in the ?test=123&booga=123 format
This method implements a multi-field form submission via a POST, using the ‘fields’ object as a set of name:value pairs to pass as the form fields.
Does a simple post request, passing the bodyinfo as the body of the request - meaning the only way to get the bodyinfo out is to do #GetHttpRequestData().content# in coldfusion for example
This does a soap compliant request to a server

Functions

JSRemote. doGetRequest

loads the file and uses the call back function func_into(String) to pass in the files contents - can also be used to pass variables in the ?test=123&booga=123 format

Parameters

urlthe url to GET to
func_handlerthe callback function to send the results to

JSRemote. doFormPostRequest

This method implements a multi-field form submission via a POST, using the ‘fields’ object as a set of name:value pairs to pass as the form fields.  It simply delegates to doPostRequest for the actual processing; the only functionality is serializing the fields.

Note that this method’s parameter ordering does NOT correspond to doPostRequest’s.

Parameters

urlthe url to POST to
fieldsthe form fields to POST
handlerthe callback function to send results to

JSRemote. doPostRequest

Does a simple post request, passing the bodyinfo as the body of the request - meaning the only way to get the bodyinfo out is to do #GetHttpRequestData().content# in coldfusion for example

Parameters

urlthe url to POST to
func_handlerthe callback function to send the results to
bodyinfowhat to send in the body of the POST

JSRemote. doSoapPost

This does a soap compliant request to a server

Parameters

urlthe url to POST to
functhe SOAP function to invoke
func_handlerthe callback function to send the results to
xmlinfowhat to send in the body of the POST (often soap data)
var GATEWAY_VERSION
the library version