Skip to content

Commit

Permalink
Add in sslverify to the list of args that can be defined when calling…
Browse files Browse the repository at this point in the history
…t he api (good for testing
  • Loading branch information
dbtlr committed Dec 7, 2016
1 parent 741413a commit 6f73d2a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion class.jetpack-client.php
Expand Up @@ -20,6 +20,7 @@ public static function remote_request( $args, $body = null ) {
'headers' => array(),
'stream' => false,
'filename' => null,
'sslverify' => true,
);

$args = wp_parse_args( $args, $defaults );
Expand All @@ -42,8 +43,9 @@ public static function remote_request( $args, $body = null ) {
$redirection = $args['redirection'];
$stream = $args['stream'];
$filename = $args['filename'];
$sslverify = $args['sslverify'];

$request = compact( 'method', 'body', 'timeout', 'redirection', 'stream', 'filename' );
$request = compact( 'method', 'body', 'timeout', 'redirection', 'stream', 'filename', 'sslverify' );

@list( $token_key, $secret ) = explode( '.', $token->secret );
if ( empty( $token ) || empty( $secret ) ) {
Expand Down Expand Up @@ -281,6 +283,7 @@ static function wpcom_json_api_request_as_blog( $path, $version = self::WPCOM_JS
'redirection' => 'int',
'stream' => 'boolean',
'filename' => 'string',
'sslverify' => 'boolean',
) );

/**
Expand Down

0 comments on commit 6f73d2a

Please sign in to comment.