HTTP Tunneling

If your browser or client application doesn't support PATCH requests, or network intermediaries block PATCH requests, then you can use HTTP tunneling with a POST request by supplying an X-HTTP-Method-Override header.

Let's look at an example to understand this better.

Suppose you want to update the login details of an account having an ID of 22 to 'rparker'. You can do this using HTTP tunneling as follows:

  1. Construct the request URL for the account ID
  2. Provide the login value that you want to update in the request body
  3. Provide the X-HTTP-Method-Override header with a value of PATCH
  4. Run the request using the POST HTTP method

Example URL

Here's the complete URL with the POST HTTP method.

POST
https://mysite.example.com/services/rest/connect/v1.4/accounts/22

Example Request

{
"login": "rparker"
}

Example Header

X-HTTP-Method-Override: PATCH

Note:

Running the request updates the account's login to 'rparker'.