| @@ 249-262 (lines=14) @@ | ||
| 246 | ||
| 247 | $start_time = microtime( true ); |
|
| 248 | ||
| 249 | if ( $do_authenticated_request ) { |
|
| 250 | $request_args['method'] = 'POST'; |
|
| 251 | ||
| 252 | $request = Client::wpcom_json_api_request_as_blog( $endpoint, Client::WPCOM_JSON_API_VERSION, $request_args, $request_body ); |
|
| 253 | } else { |
|
| 254 | $request_args = array_merge( |
|
| 255 | $request_args, |
|
| 256 | array( |
|
| 257 | 'body' => $request_body, |
|
| 258 | ) |
|
| 259 | ); |
|
| 260 | ||
| 261 | $request = wp_remote_post( $service_url, $request_args ); |
|
| 262 | } |
|
| 263 | ||
| 264 | $end_time = microtime( true ); |
|
| 265 | ||
| @@ 418-431 (lines=14) @@ | ||
| 415 | ||
| 416 | $start_time = microtime( true ); |
|
| 417 | ||
| 418 | if ( $do_authenticated_request ) { |
|
| 419 | $request_args['method'] = 'POST'; |
|
| 420 | ||
| 421 | $request = Client::wpcom_json_api_request_as_blog( $endpoint, Client::WPCOM_JSON_API_VERSION, $request_args, $request_body ); |
|
| 422 | } else { |
|
| 423 | $request_args = array_merge( |
|
| 424 | $request_args, |
|
| 425 | array( |
|
| 426 | 'body' => $request_body, |
|
| 427 | ) |
|
| 428 | ); |
|
| 429 | ||
| 430 | $request = wp_remote_post( $service_url, $request_args ); |
|
| 431 | } |
|
| 432 | ||
| 433 | $end_time = microtime( true ); |
|
| 434 | ||