Packagecom.curlyben.events
Classpublic class HTTPEvent
InheritanceHTTPEvent Inheritance flash.events.Event

An HTTP event that gives access to response and request headers.



Public Properties
 PropertyDefined by
  DataBytesLoaded : uint
[read-only] The size in bytes of the response data loaded so far.
HTTPEvent
  DataBytesTotal : int
[read-only] The size in bytes of the response data as specifed in the 'content-length' header.
HTTPEvent
  HeaderBytesTotal : uint
[read-only] The size in bytes of the response headers.
HTTPEvent
  Request : HTTPRequest
[read-only] A HTTPRequest object containing request data and headers.
HTTPEvent
Public Methods
 MethodDefined by
  
HTTPEvent(etype:String, request:HTTPRequest = null, ebubbles:Boolean = false, ecancelable:Boolean = false)
The HTTPEvent constructor.
HTTPEvent
Property detail
DataBytesLoadedproperty
DataBytesLoaded:uint  [read-only]

The size in bytes of the response data loaded so far.

Implementation
    public function get DataBytesLoaded():uint
DataBytesTotalproperty 
DataBytesTotal:int  [read-only]

The size in bytes of the response data as specifed in the 'content-length' header. If no sufficient header has been recieved, or the headers are complete but do not specify a 'content-length' then DataBytesTotal will return -1.
The value returned by DataBytesTotal may be greater than DataBytesLoaded in situations where a request hasn't yet completed.

Implementation
    public function get DataBytesTotal():int
HeaderBytesTotalproperty 
HeaderBytesTotal:uint  [read-only]

The size in bytes of the response headers.

Implementation
    public function get HeaderBytesTotal():uint
Requestproperty 
Request:HTTPRequest  [read-only]

A HTTPRequest object containing request data and headers.

Implementation
    public function get Request():HTTPRequest
Constructor detail
HTTPEvent()constructor
public function HTTPEvent(etype:String, request:HTTPRequest = null, ebubbles:Boolean = false, ecancelable:Boolean = false)

The HTTPEvent constructor.

Parameters
etype:String — The event type: EV_PREMATUREDISCONNECT, EV_CONNECTED, EV_HEADERCOMPLETE, EV_DATAPROGRESS, EV_DATACOMPLETE
 
request:HTTPRequest (default = null) — The respective HTTPRequest object.
 
ebubbles:Boolean (default = false) — Specifies whether the event should bubble.
 
ecancelable:Boolean (default = false) — Specifies whether the event can be cancelled.

See also