1

I am trying to send patch request using jmeter(which works by postman), i.e i have copied the request from postman, i am using correct header authorization etc still it returns the error 404. I am using jmeter version 3.2.

PATCH https://dev-api.test.com/walk/v1/walks/77/test/2017101609260477/test/781281212?apikey=ZwQGsEN0f65kORZ8EVQlJWA2bGNbHls0

    PATCH data:
    {
    "status":"Available"
    }

    [no cookies]

    Request Headers:
    Connection: keep-alive
    Content-Type: application/json
    Authorization: Bearer hhjahsj
    Content-Length: 26
    Host: dev-api.test.com
    User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_131)
zzz
  • 497
  • 3
  • 14
  • 32

1 Answers1

0

You should choose in HTTP Request Advanced tab Client implementations choose HTTPClient4

If Java implementations is taken, PATCH not supported:

It supports only the following methods: GET, POST, HEAD, OPTIONS, PUT, DELETE and TRACE

Also Notice:

The PUT and PATCH method body must be provided as one of the following:

The PUT and PATCH method body must be provided as one of the following:

  1. define the body as a file with empty Parameter name field; in which case the MIME Type is used as the Content-Type
  2. define the body as parameter value(s) with no name
  3. use the Body Data tab GET, DELETE, PUT and PATCH require a Content-Type. If not using a file, attach a Header Manager to the sampler and define the Content-Type there.

Also according to previous issue add parameters in query as:

https://example.com/user/accountemail=example%40example.com&password=12345678

EDIT

You can also use HTTP Raw Request plugin which support also an HTTP

non standard method

EDIT 2

You can sent PATCH request to test website: https://postman-echo.com/patch

Ori Marko
  • 56,308
  • 23
  • 131
  • 233