The HTTP Request Activity API Call Fails With Response As HTML Page Due To Cookies Being Disabled

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, the below error is thrown.

Root Cause

This error will occur due to cookies not being enabled in the API call.


Resolution

  1. Request the concerned team to enable the cookies for the concerned API call. Then pass the cookies as a parameter in the HTTP header to get a valid response.

Follow the UiPath Forum post Set Cookies For HTTP Request on how to set the cookies in the HTTP header.

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