static string buildArray(
array
$array, [strin
$sep = ':']
)
|
|
以指定分隔符的形式来将数组转化成字符串
Parameters:
array |
$array: |
关联数组 |
strin |
$sep: |
分隔符 |
API Tags:
static string buildQuery(
array
$query, [string
$sep = '&']
)
|
|
构请查询字符串
Parameters:
array |
$query: |
查询的关联数组 |
string |
$sep: |
分隔符 |
API Tags:
static WindHttp getInstance(
[string
$url = '']
)
|
|
获取http单例对象,对象唯一访问入口
Parameters:
API Tags:
Redefined in descendants as:
AbstractWindHttp __construct(
[string
$url = ''], [
$timeout = 5]
)
|
|
声明受保护的构造函数,避免在类的外界实例化
Parameters:
API Tags:
Redefined in descendants as:
关闭请求
API Tags:
Redefined in descendants as:
string get(
[string
$url = ''], [array
$data = array()], [array
$header = array()], [array
$cookie = array()], [array
$options = array()]
)
|
|
get方式传值
Parameters:
string |
$url: |
请求的url |
array |
$data: |
请求的数据 |
array |
$header: |
发送请求的头 |
array |
$cookie: |
发送的cookie |
array |
$options: |
额外的请求头 |
API Tags:
Return: | 返回页根据请求的响应页面 |
Abstract: | |
Access: | public |
Redefined in descendants as:
取得http通信中的错误
API Tags:
Redefined in descendants as:
打开一个http请求
API Tags:
Return: | http请求指针 |
Abstract: | |
Access: | public |
Redefined in descendants as:
string post(
[string
$url = ''], [array
$data = array()], [array
$header = array()], [array
$cookie = array()], [array
$options = array()]
)
|
|
发送post请求
Parameters:
string |
$url: |
请求的url |
array |
$data: |
请求的数据 |
array |
$header: |
发送请求的头 |
array |
$cookie: |
发送的cookie |
array |
$options: |
额外的请求头 |
API Tags:
Return: | 返回页根据请求的响应页面 |
Abstract: | |
Access: | public |
Redefined in descendants as:
boolean request(
string
$key, [string
$value = null]
)
|
|
发送请求
Parameters:
string |
$key: |
请求的名称 |
string |
$value: |
请求的值 |
API Tags:
Redefined in descendants as:
boolean requestByArray(
[array
$request = array()]
)
|
|
以数组格式请求
Parameters:
API Tags:
Redefined in descendants as:
响应用户请求,只返回一行数据
API Tags:
Redefined in descendants as:
响应用户的请求
API Tags:
Return: | 返回响应 |
Abstract: | |
Access: | public |
Redefined in descendants as:
string send(
[string
$method = self::GET], [array
$options = array()]
)
|
|
发送请求底层操作
Parameters:
string |
$method: |
请求方式 |
array |
$options: |
额外的主求参数 |
API Tags:
Return: | 返回页根据请求的响应页面 |
Abstract: | |
Access: | public |
Redefined in descendants as:
void setCookie(
string
$key, string
$value
)
|
|
设置cookie
Parameters:
string |
$key: |
|
string |
$value: |
|
API Tags:
boolean setCookies(
[array
$cookies = array()]
)
|
|
批量设置要传送的cookie
Parameters:
array |
$cookies: |
要传送的cookie,数组的值基于key/value形式 |
API Tags:
void setData(
string
$key, string
$value
)
|
|
设置data
Parameters:
string |
$key: |
|
string |
$value: |
|
API Tags:
boolean setDatas(
[array
$datas = array()]
)
|
|
批量设置要传送的数据
Parameters:
array |
$datas: |
要传送的数据,数组的值基于key/value形式 |
API Tags:
void setHeader(
string
$key, string
$value
)
|
|
设置http头
Parameters:
string |
$key: |
|
string |
$value: |
|
API Tags:
boolean setHeaders(
[
$headers = array()], array
$datas
)
|
|
批量设置http头
Parameters:
array |
$datas: |
实际的http头,数组的值基于key/value形式 |
|
$headers: |
|
API Tags:
void setUrl(
string|array
$url
)
|
|
设置url
Parameters:
API Tags: