Hello,


I'm trying to make a REST API POST to a webservice that uses cookie authentication and as a prerequisite I'm calling another webservice that returns a header called "Set-Cookie" and looks something like that

TOKEN1=a7986b96-25a2-434b-bc8c-24c88066e8f2; path=/,TOKEN2=sHWxYq0UmMag-9LBbA7XNVmZwkrz-YLN1ksV4fl6; path=/; HttpOnly


Since from Postman it automatically sets the needed cookies for my second request, is there a possibility to handle this in OutSystems? I've tried adding a "Cookie" header as an input to the POST call, but no success. I've also seen there is a SetCookie action from HTTPRequestHandler, but it seems it's just client side (or I'm not aware how to use it properly).


Regards,

Bogdan

Hi,

There is documentation on how to implement authentication.

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/REST/Expose_REST_APIs/Add_Custom_Authentication_to_an_Exposed_REST_API

There is also s forge component called rest extender, that contains functionality to get and set cookies that could be of help for you.

https://www.outsystems.com/forge/component-overview/3278/rest-extender

Regards,

Daniel