Cookies and the URI module

Hi all,

I am using the URI module to contact a REST service of my own that I just deployed in the same playbook. I just happened to add user authentication to this service and I need the URI module to handle that.

I successfully POSTed a request to the login route and got a cookie in response authenticating the user.

Starting with ansible 2.4.0.0, I can retrieve this cookie in the cookies dictionary of the URI module response by its name and use it in subsequent URI calls with a specific Cookie header.

But the cookies dictionary is not present in the response of the URI module of previous versions. How can I perform the same using ansible 2.3.2 or even 2.2 ? Does the URI module support sessions in some ways ?