I’m having a problem with the cookie management that HTTP Request does. My business environment uses Blue Coat as a Proxy.
When I make a Request, BlueCoat requests the sending of a Cookie that has the nomenclature “BCSI-CS-xxxxxxxxxxx” standard for the Name and also has a random number for the Cookie Value.
My problem is how I can set the Cookie Name and the Cookie Value which are random.
In the HTTP Request Cookie parameter, the Name property is not a VB Expression. So I can’t use a variable to set the Name of this Cookie. I can only use one variable for Value. If I put it in a fixed way, it works.
So I had the idea to use the HTTP Request Header template, here I put the Name as Cookie and the Value I put “BCSI-CS-xxxxxxxxxxx-1”, but UIPath can’t handle the Name Cookie inside the HTTP Header Request. Or I’m not getting the information right.
I ran a test on Postman and also on Visual studio code, and both tests I can place the cookie on the Header.
Before starting to customize an activity to perform the HTTP Request the way I need it, does anyone have any idea how to solve this using the default UIPath settings?
Hi All,
As nobody was able to evaluate my problem, I will leave here the solution I decided to do to capture the dynamic name cookie and perform the POST as expected.
I realized that when we POST to UiPath’s HTTP Request activity, it always returns Headers in Response, even if the call is denied by the destination server.
So I used the standard uipath activity to force my first POST, then I retrieve the Header Set-Cookie from my return, deal with it, and then I make a call to a POST of a custom activity that I developed, in this activity I can pass the Cookie name as Parameter and not as a Fixed String.
If someone ever needs to pass a cookie name as a parameter, I leave a possibility here. As I said in my topic, I was unable to use the standard activity to pass a Cookie Name which is dynamic, which changes daily.
After I developed the customized activity I realized that it was enough to have asked the Proxy maintenance team to perform the categorization of the website that I was doing the Request.
I suggest you do the same, the solution I developed solved my problem specifically, and I confess that it was not a very beautiful solution.
Hi Jorge,
What do you mean by categorization of the website? The endpoint is whitelisted in BlueCoat, but the problem still persists.
Thank you for your help!
I do not know exactly the adjustment that was in the bluecoat, because this adjustment is made by the Infrastructure people. They just informed me that the endpoint I was requesting was not correctly categorized, they added the endpoint to a Business category, or something. And when I tested the cookie it was no longer needed.
I created a standard activity just to retrieve the Post’s cookie, then called the custom activity, passing the cookie as the HTTPWebRequest header that I created. It worked, but I found it kind of wrong and ugly.
So when I went to my infrastructure, they solved it this way. Unfortunately they do not give details of what they do and how they do it.