\utilHttp

Summary

Methods
Properties
Constants
post()
get()
sendRequest()
sendAsyncRequest()
sendToBrowser()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

post()

post(string  $url, array  $params = [], array  $options = []) : mixed|string

发送一个POST请求

Parameters

string $url

请求URL

array $params

请求参数

array $options

扩展参数

Returns

mixed|string —

get()

get(string  $url, array  $params = [], array  $options = []) : mixed|string

发送一个GET请求

Parameters

string $url

请求URL

array $params

请求参数

array $options

扩展参数

Returns

mixed|string —

sendRequest()

sendRequest(string  $url, mixed  $params = [], string  $method = 'POST', mixed  $options = []) : array

CURL发送Request请求,含POST和REQUEST

Parameters

string $url

请求的链接

mixed $params

传递的参数

string $method

请求的方法

mixed $options

CURL的参数

Returns

array —

sendAsyncRequest()

sendAsyncRequest(string  $url, mixed  $params = [], string  $method = 'POST') : bool

异步发送一个请求

Parameters

string $url

请求的链接

mixed $params

请求的参数

string $method

请求的方法

Returns

bool —

TRUE

sendToBrowser()

sendToBrowser(string  $file, bool  $delaftersend = true, bool  $exitaftersend = true) : mixed

发送文件到客户端

Parameters

string $file
bool $delaftersend
bool $exitaftersend

Returns

mixed —