Because of our Tyk API Gateway configuration, I have to deconstruct the cookie that k6 stores, add quotes around it, and pass it back as a header. This works well in all cases… except this one.
Given this code:
response = http.get(`https://${tenant}.${environment}.${domain}/api/voice-settings-orchestration/phone-numbers/available`, {
headers: {
'Accept': '*/*',
'Cookie': 'nextiva_sso="' + authToken + '"'
},
tags: { name: `${stepNum} - https://${tenant}.${environment}.${domain}/api/voice-settings-orchestration/phone-numbers/available` },
});
console.log(authToken)
checkStatus(response, vuserID, iterNum, 200);
response = http.put(`https://${tenant}.${environment}.${domain}/api/voice-settings-orchestration/users/${profileId}/location/${locationId}`, {
headers: {
'Accept': '*/*',
'Cookie': 'nextiva_sso="' + authToken + '"'
},
tags: { name: `${stepNum} - https://${tenant}.${environment}.${domain}/api/voice-settings-orchestration/users/<profileId>/location/<locationId>` },
});
console.log(authToken)
checkStatus(response, vuserID, iterNum, 200);
The first one, the GET call, passes the cookie header; the second one, the PUT, does not. The second one also does not pass headers if I use POST.
This is bizarre - I know. Any help would be appreciated.