Requests_Proxy_HTTP
云策文档标注
概述
Requests_Proxy_HTTP 是 WordPress 中用于处理 HTTP 代理连接的接口类,提供通过 HTTP 代理建立连接的处理程序。
关键要点
- 类名:Requests_Proxy_HTTP,用于管理 HTTP 代理连接。
- 主要方法包括构造函数 __construct、设置 cURL 参数的 curl_before_send、添加请求头部的 fsockopen_header、修改远程路径的 fsockopen_remote_host_path、调整远程套接字信息的 fsockopen_remote_socket、获取认证字符串的 get_auth_string 和注册回调的 register。
- 引入版本:1.6,是 WordPress 核心库的一部分。
原文内容
HTTP Proxy connection interface
Description
Provides a handler for connection via an HTTP proxy
Methods
| Name | Description |
|---|---|
| Requests_Proxy_HTTP::__construct | Constructor |
| Requests_Proxy_HTTP::curl_before_send | Set cURL parameters before the data is sent |
| Requests_Proxy_HTTP::fsockopen_header | Add extra headers to the request before sending |
| Requests_Proxy_HTTP::fsockopen_remote_host_path | Alter remote path before getting stream data |
| Requests_Proxy_HTTP::fsockopen_remote_socket | Alter remote socket information before opening socket connection |
| Requests_Proxy_HTTP::get_auth_string | Get the authentication string (user:pass) |
| Requests_Proxy_HTTP::register | Register the necessary callbacks |
Source
Changelog
| Version | Description |
|---|---|
| 1.6 | Introduced. |