Title: Requests::patch
Published: March 29, 2023
Last modified: November 8, 2023

---

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

## In this article

 * [Description](https://developer.wordpress.org/reference/classes/wporg-requests-requests/patch/?output_format=md#description)
 * [Source](https://developer.wordpress.org/reference/classes/wporg-requests-requests/patch/?output_format=md#source)

[ Back to top](https://developer.wordpress.org/reference/classes/wporg-requests-requests/patch/?output_format=md#wp--skip-link--target)

Send a PATCH request

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wporg-requests-requests/patch/?output_format=md#description)󠁿

Note: Unlike [\WpOrg\Requests\Requests::post()](https://developer.wordpress.org/reference/classes/WpOrgRequestsRequests/post/)
and [\WpOrg\Requests\Requests::put()](https://developer.wordpress.org/reference/classes/WpOrgRequestsRequests/put/),`
$headers` is required, as the specification recommends that should send an ETag

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wporg-requests-requests/patch/?output_format=md#source)󠁿

    ```php
    public static function patch($url, $headers, $data = [], $options = []) {
    	return self::request($url, $headers, $data, self::PATCH, $options);
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/requests/src/requests.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/Requests/src/Requests.php#L366)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/Requests/src/Requests.php#L366-L368)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwporg-requests-requests%2Fpatch%2F)
before being able to contribute a note or feedback.