The application dispatches HTTPStatusEvent objects when a network request returns an HTTP status code.

HTTPStatusEvent objects are always sent before error or completion events. An HTTPStatusEvent object does not necessarily indicate an error condition; it simply reflects the HTTP status code (if any) that is provided by the networking stack. Some environments may be unable to detect HTTP status codes; a status code of 0 is always reported in these cases.


Inherited from Event.


Can be created with method new:

Lib.Media.Events.HTTPStatusEvent.new(type, bubbles, cancelable, status)

Creates an Event object that contains specific information about HTTP status events.

type - The type of the event. Event listeners can access this information through the inherited type property. There is only one type of HTTPStatus event: HTTPStatusEvent.HTTP_STATUS.

bubbles - (default = false) - Determines whether the Event object participates in the bubbling stage of the event flow. Event listeners can access this information through the inherited bubbles property.

cancelable - (default = false) - Determines whether the Event object can be canceled. Event listeners can access this information through the inherited cancelable property.

status - (default = 0) - Numeric status. Event listeners can access this information through the status property.


Created HTTPStatusEvent objects has properties:

status

[read-only] The HTTP status code returned by the server, int.

responseHeaders

The response headers that the response returned, as an array of URLRequestHeader objects.


methods:

clone()

Creates a copy of the HTTPStatusEvent object and sets the value of each property to match that of the original.


toString()

Returns a string that contains all the properties of the HTTPStatusEvent object.



Event types:

Lib.Media.Events.HTTPStatusEvent.HTTP_STATUS

The HTTPStatusEvent.HTTP_STATUS constant defines the value of the type property of a httpStatus event object.

Created with the Personal Edition of HelpNDoc: Easily create CHM Help documents