Core.Web.HttpConnection
Constructor Summary | |
---|---|
Public | Core.Web.HttpConnection() Creates a new HttpConnection .
|
Instance Field Summary | |
---|---|
Internal | _url The URL. |
Internal | _contentType The request content type. |
Internal | _method The request method. |
Internal | _messageObject The message content object. |
Internal | _listenerList Listener storage facility. |
Internal | _disposed Disposed state. |
Internal | _xmlHttpRequest Browser XMLHttpRequest object. |
Internal | _requestHeaders Request header value map. |
Instance Method Summary | |
---|---|
Internal | _preprocessSafariDOM() Preprocesses outgoing requests to Safari (invoked when appropriate quirk is detected). |
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-typenode
(Node)
- the node to processl
(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