Core.Web.HttpConnection
Constructor Summary | |
---|---|
Public | Core.Web.HttpConnection() Creates a new HttpConnection .
|
Instance Field Summary | |
---|---|
Internal | _url |
Internal | _contentType |
Internal | _method |
Internal | _messageObject |
Internal | _listenerList |
Internal | _disposed |
Internal | _xmlHttpRequest |
Internal | _requestHeaders |
Instance Method Summary | |
---|---|
Internal | _preprocessSafariDOM() |
Public | addResponseListener() Adds a response listener to be notified when a response is received from the connection. |
Public | connect() Executes the HTTP connection. |
Public | dispose() Disposes of the connection. |
Public | getResponseHeader() Returns a header from the received response. |
Public | getAllResponseHeaders() Returns all the headers of the response. |
Public | getStatus() Returns the response status code of the HTTP connection, if available. |
Public | getResponseText() Returns the response as text. |
Public | getResponseXml() Returns the response as an XML DOM. |
Internal | _processReadyStateChange() Event listener for readystatechange events received from
the XMLHttpRequest .
|
Public | removeResponseListener() Removes a response listener to be notified when a response is received from the connection. |
Public | setRequestHeader() Sets a header in the request. |
HttpConnection
.
This method simply configures the connection, the connection
will not be opened until connect()
is invoked.
url
(String)
- the target URLmethod
(String)
- the connection method, i.e., GET or POSTmessageObject
- the message to send (may be a String or XML DOM)contentType
(String)
- the request content-typel
(Function)
- the listener to addheader
(String)
- the header to retrieveheader
(String)
- the header to retrievereadystatechange
events received from
the XMLHttpRequest
.
l
(Function)
- the listener to removeheader
(String)
- the header to retrievevalue
(String)
- the value of the header