Unknown request body type error for Patch request

Has anyone encountered the following error WARN[0000] Request Failed error="unknown request body type []interface {}" ?
This is for a patch request with 'Content-Type': 'application/json-patch+json' and request body as
"op": "something",
"path": "/something",
"value": "Z"
Works fine on postman. Thanks in advance

Hi @sumanta.r86

Can you share the part of the script where you are doing the patch request? Are you using JSON.stringify(body) when passing the body data, as in the example patch( url, [body], [params] ), and have you tried with content type 'application/json'?

I hope this helps. If it does not work, kindly share the script so we can attempt to reproduce it.



JSON.stringify(body) worked. Thanks a lot !

1 Like