Hello.
I try to reach a Rest API to send thousands of items, one by one, using by a POST request.
So I have a collection of items. Each time my test is executed, one of those items is sent. Each item is sent an only time. If the Rest API receives an item two times, it should throw an exception. I don’t want that.
I did not found examples for this case on your documentation.
Could you help me please ?
Today, I can send an only item :
export default () => {
group('LeRefuge incoming message smoke test', () => {
group('Send SMS using by WhatsApp', () => {
const url: string = `${ngrokUrl}/api/1/Message/Incoming`;
const body: StructuredRequestBody = { smsSid: '', From: '', };
const params: RefinedParams<'text'> = {
headers: {
Authorization: leRefugeToken,
'Content-Type': 'application/x-www-form-urlencoded',
'X-Twilio-Signature': '',
},
};
const res: RefinedResponse<'text'> = http.post<'text'>(url, body, params);
console.error(res.status);
console.error(res.body);
console.error(res.error);
check(res, {
'status is 200': () => res.status === 200,
});
sleep(1);
});
});
};
Thanks.