בדוגמה הבאה, נניח שמדיניות ServiceCallout נמצאת בבקשת ה-API proxy, ותגובת ה-callout מכילה כמה כותרות עם אותו שם (Set-Cookie). בהנחה שמשתנה התגובה של Service Callout הוא ברירת המחדל calloutResponse, המדיניות הבאה מקבלת את ערך הכותרת השנייה Set-Cookie.
<AssignMessage name="AM-Payload-from-SC-header"> <Set> <Payload contentType="application/json"> {"Cookies from Service Callout":" {calloutResponse.header.Set-Cookie.2}"} </Payload> </Set> <IgnoreUnresolvedVariables>true </IgnoreUnresolvedVariables> <AssignTo>response</AssignTo> </AssignMessage>
כדי להציג את כל ערכי הכותרת, משתמשים במשתנה הבא:
{calloutResponse.header.Set-Cookie.values}