Requests_Session::patch() WordPress Method

The Requests_Session::patch() method is used to send a PATCH request to a WordPress site. This is useful for making changes to a WordPress site without having to go through the admin interface. The PATCH request is sent as a JSON object, and the response is also returned as a JSON object.

Requests_Session::patch( $url,  $headers,  $data = array(),  $options = array() ) #

Send a PATCH request


Description

Note: Unlike post and put, $headers is required, as the specification recommends that should send an ETag


Top ↑

Source

File: wp-includes/Requests/Session.php

	public function patch($url, $headers, $data = array(), $options = array()) {
		return $this->request($url, $headers, $data, Requests::PATCH, $options);
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.