protected function _send_request( $url, $args = array() ) {
		$url = 'https://mailtrap.io/api/v1/inboxes/' . $this->config['inbox_id'] . $url;

		$args = wp_parse_args( $args, array(
			'method'  => 'GET',
			'headers' => array(),
		) );

		$args['headers'] = array_merge( $args['headers'], array(
			'Api-Token' => $this->config['api_token'],
			'Accept'    => 'application/json',
		) );

		$response = wp_remote_request( $url, $args );

		return $response;
	}
protected function _send_request( $url, $args = array() ) {
		$url = 'https://mailtrap.io/api/v1/inboxes/' . $this->config['inbox_id'] . $url;

		$args = wp_parse_args( $args, array(
			'method'  => 'GET',
			'headers' => array(),
		) );

		$args['headers'] = array_merge( $args['headers'], array(
			'Api-Token' => $this->config['api_token'],
			'Accept'    => 'application/json',
		) );

		$response = wp_remote_request( $url, $args );

		return $response;
	}
protected function _send_request ( $ url , $ args = array ( ) ) { $ url = 'https://mailtrap.io/api/v1/inboxes/' . $ this -> config [ 'inbox_id' ] . $ url ; $ args = wp_parse_args ( $ args , array ( 'method' => 'GET' , 'headers' => array ( ) , ) ) ; $ args [ 'headers' ] = array_merge ( $ args [ 'headers' ] , array ( 'Api-Token' => $ this -> config [ 'api_token' ] , 'Accept' => 'application/json' , ) ) ; $ response = wp_remote_request ( $ url , $ args ) ; return $ response ; }
Sends request to the Mailtrap.io API.

@since 1.0.0

@access protected
@param string $url The relative URL to a resource.
@param array $args The array of arguments for a request.
@return array The response array.
Sends request to the Mailtrap . io API .