Properties

$readyState

$readyState : 

Type

$responseBody

$responseBody : 

Type

$responseStream

$responseStream : 

Type

$responseText

$responseText : 

Type

$responseXML

$responseXML : 

Type

$status

$status : 

Type

$statusText

$statusText : 

Type

$responseVersion

$responseVersion : 

Type

$option

$option : 

Type

$url

$url : 

Type

$postdata

$postdata : 

Type

$httpheader

$httpheader : 

Type

$responseHeader

$responseHeader : 

Type

$parsed_url

$parsed_url : 

Type

$timeout

$timeout : 

Type

$errstr

$errstr : 

Type

$errno

$errno : 

Type

$ch

$ch : 

Type

$isgzip

$isgzip : 

Type

$maxredirs

$maxredirs : 

Type

$__isBinary

$__isBinary : 

Type

Methods

__set()

__set(  $property_name,   $value) 

Parameters

$property_name
$value

Throws

\Exception

__get()

__get(  $property_name) : mixed

Parameters

$property_name

Returns

mixed

abort()

abort() : mixed

取消.

Returns

mixed

getAllResponseHeaders()

getAllResponseHeaders() : string

Returns

string

getResponseHeader()

getResponseHeader(  $bstrHeader) : string

获取返回头.

Parameters

$bstrHeader

Returns

string

open()

open(  $bstrMethod,   $bstrUrl, boolean  $varAsync = true, string  $bstrUser = '', string  $bstrPassword = '') : boolean

链接远程接口.

Parameters

$bstrMethod
$bstrUrl
boolean $varAsync
string $bstrUser
string $bstrPassword

Throws

\Exception

Returns

boolean

setTimeOuts()

setTimeOuts(  $resolveTimeout,   $connectTimeout,   $sendTimeout,   $receiveTimeout) : mixed

设置超时时间.

Parameters

$resolveTimeout
$connectTimeout
$sendTimeout
$receiveTimeout

Returns

mixed

send()

send(string  $varBody = '') : mixed

发送数据.

Parameters

string $varBody

Returns

mixed

setRequestHeader()

setRequestHeader(  $bstrHeader,   $bstrValue, boolean  $append = false) : boolean

设置请求HTTP头.

Parameters

$bstrHeader
$bstrValue
boolean $append

Returns

boolean

add_postdata()

add_postdata(string  $bstrItem, mixed  $bstrValue) 

添加数据.

Parameters

string $bstrItem

参数

mixed $bstrValue

addBinary()

addBinary(string  $name, string  $entity,   $filename = null,   $mime = '') : mixed

Parameters

string $name
string $entity
$filename
$mime

Returns

mixed

addText()

addText(string  $name, string  $entity) : mixed

Parameters

string $name
string $entity

Returns

mixed

enableGzip()

enableGzip() : mixed

启用Gzip.

Returns

mixed

setMaxRedirs()

setMaxRedirs(integer  $n) : mixed

Parameters

integer $n

Returns

mixed

reinit()

reinit() 

重置.