Skip to content

Commit ba1ccab

Browse files
authored
Merge pull request #6036 from wp-cli/add-http-hook
Add hook to `http_request()` util
2 parents 78fb639 + 00bec6c commit ba1ccab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

php/utils.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,8 @@ function http_request( $method, $url, $data = null, $headers = [], $options = []
830830
$options['verify'] = ! empty( ini_get( 'curl.cainfo' ) ) ? ini_get( 'curl.cainfo' ) : true;
831831
}
832832

833+
$options = WP_CLI::do_hook( 'http_request_options', $options );
834+
833835
RequestsLibrary::register_autoloader();
834836

835837
$request_method = [ RequestsLibrary::get_class_name(), 'request' ];

0 commit comments

Comments
 (0)