How does getresponsecookies work in Mendix Stuido Pro 8.0 since RestServices module is not supported nor required anymore?
I have a rest service that I need to consume. The login would return some cookie parameters. One of the cookie needs to be retrieved and presented in later transaction as httpheader. Parsing “set-cookie” headers is tedious since it normally contains multiple keys. Thanks!
Hi i have done something like this:
In the login call, a cookie is returned. After you Rest call, you can retrieve this from the $latestHttpresponse asscocation to the Httpheaders.
The cookies will be in one of the httpheaders in the value attribute. To get the exact value you need you might have to do some string editting(substring the part that you need)
In the consume call you can put the cookie in a HTTP header with native REST. As a key you can fill in ‘Cookie’ and in the value you can add the value of the Cookie(JSESSIONID= for example)