src/Http/Client.php
public function createRequest(string $method, string $url, $body=null, array $headers=[])
  {
    # Merge Default Headers with user provided headers
    $headers = array_merge(
      [
         'Accept'          => '*/*',
         'Accept-Encoding' => 'gzip, deflate'
      ],
      $headers
    );

    # Create the httpRequest
    $this->httpRequest = new \GuzzleHttp\Psr7\Request( $method, $url, $headers, $body );

    return $this->httpRequest;
  }
public function createRequest(string $method, string $url, $body=null, array $headers=[])
  {
    # Merge Default Headers with user provided headers
    $headers = array_merge(
      [
         'Accept'          => '*/*',
         'Accept-Encoding' => 'gzip, deflate'
      ],
      $headers
    );

    # Create the httpRequest
    $this->httpRequest = new \GuzzleHttp\Psr7\Request( $method, $url, $headers, $body );

    return $this->httpRequest;
  }
public function createRequest ( string $ method , string $ url , $ body = null , array $ headers = [ ] ) { # Merge Default Headers with user provided headers $ headers = array_merge ( [ 'Accept' => '*/*' , 'Accept-Encoding' => 'gzip, deflate' ] , $ headers ) ; # Create the httpRequest $ this -> httpRequest = new \ GuzzleHttp \ Psr7 \ Request ( $ method , $ url , $ headers , $ body ) ; return $ this -> httpRequest ; }
Creates & returns a GuzzleHttp\Request

@param  string $method     [description]
@param  string $url        [description]
@param  mixed  $body       [description]
@param  array  $headers    [description]
@return object
Creates & returns a GuzzleHttp \ Request