The HTTP Request Activity API Call Fails With Response As HTML Page Due To Disable Of The Cookies

Due to disabling of the cookies, the HTTP request activity API call fails with a response as an HTML page.

Error Message: On saving the response in the .html format, below error is thrown.


Root Cause: Due to a lack of enabling the cookies in the API call, this error will occur.

  1. Request the concerned team to get enable the cookies for the concerned API call. Then pass the cookies as a parameter in the HTTP header to get a valid response.
  2. This API call works in the Postman application, because it will pass the cookies in the header as a parameter
  3. Follow the approach of API Test automation for Postman integration to get a valid response.