Packagecom.aispeech.net.http
Classpublic class AIHttpRequest
InheritanceAIHttpRequest Inheritance Object

HTTP Request simplifed version of gabriel's as3httpclient



Public Properties
 PropertyDefined By
  body : *
The request body can be anything but should respond to: - readBytes(bytes:ByteArray, offset:uint, length:uint) - length - bytesAvailable - close
AIHttpRequest
  contentType : String
[write-only] Set content type.
AIHttpRequest
  hasBody : Boolean
[read-only]
AIHttpRequest
  header : AIHTTPHeader
[read-only]
AIHttpRequest
  method : String
[read-only]
AIHttpRequest
Protected Properties
 PropertyDefined By
  _body : *
AIHttpRequest
  _header : AIHTTPHeader
AIHttpRequest
  _method : String
AIHttpRequest
Public Methods
 MethodDefined By
  
AIHttpRequest(method:String = POST, header:AIHTTPHeader = null, body:* = null)
Create request.
AIHttpRequest
  
addHeader(name:String, value:String):void
Add a header.
AIHttpRequest
  
getHeader(uri:URI):ByteArray
Get header.
AIHttpRequest
  
toString():String
AIHttpRequest
Property Detail
_bodyproperty
protected var _body:*

_headerproperty 
protected var _header:AIHTTPHeader

_methodproperty 
protected var _method:String

bodyproperty 
body:*

The request body can be anything but should respond to: - readBytes(bytes:ByteArray, offset:uint, length:uint) - length - bytesAvailable - close


Implementation
    public function get body():*
    public function set body(value:any):void
contentTypeproperty 
contentType:String  [write-only]

Set content type.


Implementation
    public function set contentType(value:String):void
hasBodyproperty 
hasBody:Boolean  [read-only]


Implementation
    public function get hasBody():Boolean
headerproperty 
header:AIHTTPHeader  [read-only]


Implementation
    public function get header():AIHTTPHeader
methodproperty 
method:String  [read-only]


Implementation
    public function get method():String
Constructor Detail
AIHttpRequest()Constructor
public function AIHttpRequest(method:String = POST, header:AIHTTPHeader = null, body:* = null)

Create request. The raw request body can be anything but should respond to: - readBytes(bytes:ByteArray, offset:uint, length:uint) - length - bytesAvailable - close

Parameters
method:String (default = POST)
 
header:AIHTTPHeader (default = null)
 
body:* (default = null)
Method Detail
addHeader()method
public function addHeader(name:String, value:String):void

Add a header.

Parameters

name:String
 
value:String

getHeader()method 
public function getHeader(uri:URI):ByteArray

Get header.

Parameters

uri:URI — URI

Returns
ByteArray
toString()method 
public function toString():String

Returns
String