\johnxu\wechatHttp

Summary

Methods
Properties
Constants
exec()
getCode()
getBody()
getHead()
getErrno()
getError()
__callStatic()
post()
get()
put()
delete()
head()
patch()
upload()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setOpt()
httpBuildQuery()
$ch
$timeout
$instance
$data
$errno
$error
$headerSize
N/A

Properties

$ch

$ch : 

Type

$timeout

$timeout : 

Type

$instance

$instance : 

Type

$data

$data : 

Type

$errno

$errno : 

Type

$error

$error : 

Type

$headerSize

$headerSize : 

Type

Methods

exec()

exec(string  $uri, array  $params = array(), array  $header = array('Expect:'), array  $opt = array(), string  $method = 'get') : \Org\Wechat\Http

Parameters

string $uri
array $params
array $header
array $opt
string $method

Returns

\Org\Wechat\Http

getCode()

getCode() : mixed

获取状态码

Returns

mixed

getBody()

getBody(boolean  $is_json = true, boolean  $is_array = true, string  $is_html = '') : string

获取内容信息

Parameters

boolean $is_json

是否将结果json解析为数据或对象

boolean $is_array

是将结果解析喂数据还是对象

string $is_html

是否使用html获取函数过滤html标记

Returns

string

getHead()

getHead() : string

获取头部信息

Returns

string

getErrno()

getErrno() : integer

获取错误号

Returns

integer

getError()

getError() : string

获取错误信息

Returns

string

__callStatic()

__callStatic(string  $name, array  $arguments) : mixed

静态调用

Parameters

string $name
array $arguments

Returns

mixed

post()

post(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

get()

get(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

put()

put(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

delete()

delete(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

head()

head(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

patch()

patch(mixed  $uri, mixed  $params = array() : static

, $header = array() );

Parameters

mixed $uri
mixed $params

Returns

static

upload()

upload(mixed  $uri, mixed  $params = array() : static

);

Parameters

mixed $uri
mixed $params

Returns

static

setOpt()

setOpt(string  $uri, array  $opt = array()) 

设置curl参数

Parameters

string $uri
array $opt

httpBuildQuery()

httpBuildQuery(array  $data) : string

构造类型http_build_query功能

Parameters

array $data

Returns

string