HTTP Method Patch
@param string $uri optional uri to use
@param string $payload data to send in body of request
@param string $mime MIME to use for Content-Type
@return Request
438
public static function patch($uri, $payload = null, $mime = null)
    {
        return self::init(Http::PATCH)->uri($uri)->body($payload, $mime);
    }
649995
protected function httpPostJson($uri, $body)
    {
        $this->log[] = [
                        'request' => [
                                    'method' => 'POST',
                                    'uri'    => $uri,
                                    'body'   => $body,
                                    ],
                        ];
        $response = \Httpful\Request::post($uri)
                                                ->addHeader('X-Auth-Email', $this->email)
                                                ->addHeader('X-Auth-Key', $this->apikey)
                                                ->sendsAndExpects(\Httpful\Mime::JSON)
                                                ->parseWith(function ($body) {
                                                    return \Metaclassing\Utility::decodeJson($body);
                                                })
                                                ->body($body)
                                                ->send()
                                                ->body;
        $this->log[count($this->log) - 1]['response'] = $response;
        if ($response['success'] != true) {
            throw new \Exception("post to {$uri} unsuccessful");
        }

        return $response['result'];
    }
389936
public function body($payload, $mimeType = null)
    {
        $this->mime($mimeType);
        $this->payload = $payload;
        // Iserntentially don't call _serializePayload yet.  Wait until
        // we actually send off the request to convert payload to string.
        // At that time, the `serialized_payload` is set accordingly.
        return $this;
    }
569668
private function requestNonce(string $uri): Promise {
        return call(function () use ($uri) {
            $request = new Request($uri, 'HEAD');

            try {
                /** @var Response $response */
                $response = yield $this->http->request($request, [
                    Client::OP_DISCARD_BODY => true,
                ]);

                if (!$response->hasHeader('replay-nonce')) {
                    throw new AcmeException("HTTP response didn't carry replay-nonce header.");
                }

                return $response->getHeader('replay-nonce');
            } catch (HttpException $e) {
                throw new AcmeException("HEAD request to {$uri} failed, could not obtain a replay nonce: " . $e->getMessage(), null, $e);
            }
        });
    }
193017
public static function post($uri, $payload = null, $mime = null)
    {
        return self::init(Http::POST)->uri($uri)->body($payload, $mime);
    }
1328634
public function respondUpdatedWithPayload($payload = null, $message = "Updated")
    {
        $reponse = $this->setStatusCode(ResponseHTTP::HTTP_ACCEPTED)
            ->respondWithMessageAndPayload($payload, $message);
        return $reponse;
    }
1015940
private function preparePayload($payload, CompressionInterface $compression_method = null)
    {
        $prepared = is_string($payload) ? $payload : json_encode($payload);

        Assertion::notNull($prepared, 'The payload is empty or cannot encoded into JSON.');

        if (null === $compression_method) {
            return $prepared;
        }
        $compressed_payload = $compression_method->compress($prepared);
        Assertion::string($compressed_payload, 'Compression failed.');

        return $compressed_payload;
    }
623396
private function httpPut($url, $payload = [], $query_arguments = [])
    {
        if (!empty($query_arguments)) {
            $url .= '?' . http_build_query($query_arguments);
        }

        $curl = $this->getCurlHandle($url);

        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
        curl_setopt($curl, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
        curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($payload));

        return $this->executeCurlRequest($curl, $url);
    }
637654
static protected function achieveSerializer_( string$mime ):S\ASerializer
	{
		static::checkSerializerSupported_( $mime );

		$serializer= static::getSerializer_( $mime );

		return static::instantiateSerializer_( $serializer );
	}
37170
public RFuture<String> post(String url, String data) {
    return req(url).setPayload(data).execute().map(GET_PAYLOAD);
  }
1007477
public function encode(Payload $payload)
    {
        $token = $this->jwt->encode($payload->get());

        return new Token($token);
    }
403496
public function patch($uri, $handler, $middlewares = array())
    {
        return $this->add($this->route('PATCH', $uri, $handler, $middlewares));
    }
1205284
public function patch($uri,array $headers,$body)
        {
            return $this->prepareRequest(self::PATCH,$uri,$headers,$body);
        }
719308
public function patch($url, $body = [], $headers = [], $options = [])
    {
        return $this->request('PATCH', $url, $body, $headers, $options);
    }
1096792
protected function _send_patch_request( $url, $body ) {
		$response = $this->_send_request( $url, array(
			'method' => 'PATCH',
			'body'   => $body,
		) );

		$response_code = wp_remote_retrieve_response_code( $response );
		$this->assertEquals( 200, $response_code, 'The Mailtrap.io API resonse code is not equals to 200.' );

		return $response;
	}
356124
public void PATCH(String partialUrl, Object payload)
    {    
        URI uri = buildUri(partialUrl);   
        executePatchRequest(uri, payload);
    }
1365004
public function patch(string $route, $body = [], $headers = [])
    {
        return $this->request('PATCH', $route, $body, $headers);
    }