Unable to get response in JSON format with POST/PUT requests for adding/updating a Product to the category
Reference link: http://devdocs.magento.com/swagger/index.html#/
API: catalogCategoryLinkRepositoryV1 -> /V1/categories/{categoryId}/products
End point URL -> http:///rest/default/V1/categories/4/products
Header:
Content-Type: application/json Authorization:
Request body:
{
"productLink": {
"sku": "Happiest_Minds_Bag",
"position": 0,
"categoryId": "4",
"extensionAttributes": {}
}
}
Response: "true"
The response which I get is a plain string "true" with status code "200 OK". But for any other error status code for this request I get a proper JSON response.
Why am I not getting response in JSON format for status code "200 OK"?