TransportInterface
HTTP 传输类接口。
| 自 |
1.0 |
|---|---|
| 包 |
Joomla 框架 |
方法
isSupported
检查 HTTP 传输层是否可用的方法
isSupported() :
静态
| 自 |
1.0 |
|---|
响应
bool如果可用则为真,否则为假
request
向服务器发送请求,并返回包含响应的响应对象。
request( method, \Joomla\Uri\UriInterface uri, data = null, mixed||string|int headers = [], timeout = null, userAgent = null) : \Joomla\Http\Response
| 自 |
1.0 |
|---|
参数
- 方法
string发送请求的 HTTP 方法。- uri
UriInterface要请求的资源的 URI。- 数据
mixed与请求一起发送的关联数组或字符串。- 标题
array<string|int, mixed>与请求一起发送的请求头数组。- 超时
int读取超时时间(以秒为单位)。- 用户代理
string与请求一起发送的可选用户代理字符串。