Package | com.aispeech.net.http |
Class | public class AIHttpRequest |
Inheritance | AIHttpRequest ![]() |
Property | Defined 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 |
Property | Defined By | ||
---|---|---|---|
_body : * | AIHttpRequest | ||
_header : AIHTTPHeader | AIHttpRequest | ||
_method : String | AIHttpRequest |
Method | Defined 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 |
_body | property |
protected var _body:*
_header | property |
protected var _header:AIHTTPHeader
_method | property |
protected var _method:String
body | property |
body:*
The request body can be anything but should respond to: - readBytes(bytes:ByteArray, offset:uint, length:uint) - length - bytesAvailable - close
public function get body():*
public function set body(value:any):void
contentType | property |
contentType:String
[write-only] Set content type.
public function set contentType(value:String):void
hasBody | property |
hasBody:Boolean
[read-only] public function get hasBody():Boolean
header | property |
method | property |
method:String
[read-only] public function get method():String
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
Parametersmethod:String (default = POST )
| |
header:AIHTTPHeader (default = null )
| |
body:* (default = null )
|
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
|
ByteArray |
toString | () | method |
public function toString():String
ReturnsString |