How to receive multiple cookies using REST Plugin?

How to receive multiple cookies using REST Plugin?

book

Article ID: KB0081400

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for REST and JSON 2.1.0

Description

Sometimes while receiving response from REST Service, multiple cookies are to be received by the Invoke REST API client. In this scenario, REST Plugin shows only single cookie in the response as REST plugin does not directly support multiple cookies in the response.
 
If we set property bw.plugin.http.protocol.single-cookie-header=true, then plugin allows receiving of multiple cookies in the header with all name value pairs.

Issue/Introduction

How-to-receive-multiple-cookies-using-REST-Plugin

Environment

All Environment

Resolution

Steps to fetch multiple cookies in response of Invoke REST API Activity:

1. Configure Invoke REST API activity as per your request. 
2. Go to Output Editor tab-> Set Cookie: Set cardinality as repeating*
3. Go to Designer.tra and add below property: "bw.plugin.http.protocol.single-cookie-header=true"
4. Restart the Designer and test the application. 

Above stpes will also work for HTTP Activities such as Send HTTP Request, HTTP Receiver etc.