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!
1 answers

Hi i have done something like this:

  1. In the login call, a cookie is returned. After you Rest call, you can retrieve this from the $latestHttpresponse asscocation to the Httpheaders.
  2. 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)
  3. 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)


Hope this helps.