WpOrg\Requests\Proxy
Http::register()
Register the necessary callbacks
Method of the class: Http{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Http = new Http(); $Http->register( $hooks );
- $hooks(\WpOrg\Requests\Hooks) (required)
- Hook system
Notes
- See: \WpOrg\Requests\Proxy[Http::curl_before_send()](/function/Http::curl_before_send)
- See: \WpOrg\Requests\Proxy[Http::fsockopen_remote_socket()](/function/Http::fsockopen_remote_socket)
- See: \WpOrg\Requests\Proxy[Http::fsockopen_remote_host_path()](/function/Http::fsockopen_remote_host_path)
- See: \WpOrg\Requests\Proxy[Http::fsockopen_header()](/function/Http::fsockopen_header)
Changelog
Since 1.6 | Introduced. |
Http::register() Http::register code WP 6.6.2
public function register(Hooks $hooks) { $hooks->register('curl.before_send', [$this, 'curl_before_send']); $hooks->register('fsockopen.remote_socket', [$this, 'fsockopen_remote_socket']); $hooks->register('fsockopen.remote_host_path', [$this, 'fsockopen_remote_host_path']); if ($this->use_authentication) { $hooks->register('fsockopen.after_headers', [$this, 'fsockopen_header']); } }