\serviceHttpService

HTTP请求服务 Class HttpService

Summary

Methods
Properties
Constants
get()
post()
request()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
build()
No private properties found
N/A

Methods

get()

get(string  $url, array  $query = array(), array  $options = array()) : boolean|string

以get模拟网络请求

Parameters

string $url

HTTP请求URL地址

array $query

GET请求参数

array $options

CURL参数

Returns

boolean|string

post()

post(string  $url, array  $data = array(), array  $options = array()) : boolean|string

以get模拟网络请求

Parameters

string $url

HTTP请求URL地址

array $data

POST请求数据

array $options

CURL参数

Returns

boolean|string

request()

request(string  $method, string  $url, array  $options = array()) : boolean|string

CURL模拟网络请求

Parameters

string $method

请求方法

string $url

请求方法

array $options

请求参数[header,data,ssl_cer,ssl_key]

Returns

boolean|string

build()

build(array  $data, boolean  $needBuild = true) : array

POST数据过滤处理

Parameters

array $data
boolean $needBuild

Returns

array