Do a PATCH request

@param   string      $url
@param   array       $params
@param   array       $options
@param   array       $headers
@return  mixed
@throws  \Exception
339860
public function patch($url, $params, $options = [], $headers = []) {
        return $this->update('patch', $url, $params, $options, $headers);
    }
366932
public function put($url, $body = [], $headers = [], $options = [])
    {
        return $this->request('PUT', $url, $body, $headers, $options);
    }
652819
public static function head($url, $headers = array(), $options = array()) {
		return self::request($url, $headers, null, self::HEAD, $options);
	}
8680
public function post($url, array $params = null, array $options = array())
	{
		return $this->request($url, 'POST', $params, $options);
	}
938022
public function delete($url, $data = null, $headers = [], $options = [])
    {
        return $this->createRequestShortcut('DELETE', $url, $data, $headers, $options);
    }
152892
public function get($url = null, array $options = [])
    {
        return $this->responseBuilder->build($this->send(new Request('GET', $url), $options));
    }
642576
public function patch($uri, array $data = [], array $headers = [])
    {
        $server = $this->transformHeadersToServerVars($headers);

        $this->call('PATCH', $uri, $data, [], [], $server);

        return $this;
    }
759884
public function request(
        $url,
        array $parameters = [],
        $method = SocialConnectClient::GET,
        array $headers = [],
        array $options = []
    ) {
        switch ($method) {
            case SocialConnectClient::GET:
                $response = $this->_client->get(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::POST:
                $response = $this->_client->post(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::PUT:
                $response = $this->_client->put(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            case SocialConnectClient::DELETE:
                $response = $this->_client->delete(
                    $url,
                    $parameters,
                    ['headers' => $headers]
                );
                break;
            default:
                throw new InvalidArgumentException("Method {$method} is not supported");
        }

        return new Response(
            $response->getStatusCode(),
            (string)$response->getBody(),
            $response->getHeaders()
        );
    }
1339382
public function request($url, array $options = array()) {
    // Initialize a curl
    $curl = curl_init($url);
    // If there's options
    if ($options) {
      // Set options
      curl_setopt_array($curl, $options);
    }
    // Execute
    $response = curl_exec($curl);
    // Get header size
    $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
    // Get body
    $body = substr($response, $headerSize);
    // Get status
    $status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    // Parse header
    $headers = $this->parseHeaders(substr($response, 0, $headerSize));
    // Close curl
    curl_close($curl);
    // Return response
    return new Response($body, $status, $headers);
  }
61182
public function request($url, $options = array())
    {
        $result = null;
        $this->hook->attach('http.request.before', $url, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $result = $this->socket->request($url, $options);
        $this->hook->attach('http.request.after', $url, $options, $result, $this);
        return $result;
    }
1312516
public function post($url, $body = [], $headers = [], $options = [])
    {
        return $this->request('POST', $url, $body, $headers, $options);
    }
954407
public static function get(string $url, array $params = null, array $headers = null)
    {
        return static::quickRequest($url, self::GET, $params, $headers);
    }
399714
public function patch($uri, $params = null, $body = null)
    {
        return $this->performRequest("patch", $uri, $params, $body);
    }
841019
public static function put(string $url, array $params = null, array $headers = null)
    {
        return static::quickRequest($url, self::PUT, $params, $headers);
    }
679660
public function patch(string $url, array $params = [])
    {
        return $this->send('PATCH', $url, [
            $this->bodyFormat => $params,
        ]);
    }
248729
public function get($url, $params = [], $options = [], $headers = []) {
        return $this->makeCall('get', $url, $params, $options, $headers);
    }
1088227
public function head($url, $headers = [], $options = [])
    {
        return $this->createRequestShortcut('HEAD', $url, null, $headers, $options);
    }