Hi, we see that in upper versions when we use a post in this way:
import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js';
let formData = new FormData()
let correlationId = uuidv4();
formData.append('correlationId', correlationId);
formData.append('activityCorrelationId', element.activityCorrelationId);
formData.append('channelCorrelationId', element.channelCorrelationId);
formData.append('file', http.file(zipFiles[i], element.file));
i++;
let response = http.post(http.url`${config.baseImportiaUrl}api/integrationFiles`, formData.body(), {
headers: {
'Authorization': `${token}`,
'context': `${JSON.stringify(element.context)}`,
'Content-Type': `multipart/form-data; boundary=` + formData.boundary,
'Ocp-Apim-Subscription-Key': `${config.apimSubscriptionKey}`
},
tags: {
service: 'integrationFiles'
}
});
check(response, { 'Integration Files Code 2xx Successful': (r) => r.status >= 200 && r.status <= 226 });
Always returns a 400 Bad Request. But in version 0.43.1 all is ok.
Can you help us? We want to use the latest version. Maybe @codebien ? Thanks in advance.