Hi, i fund bug in code. not working scenario:
import { loadTest } from 'loadtest';
const options = {
url: 'http://localhost:3000/product',
maxRequests: 1,
body: JSON.stringify({ id: 1 }),
method: 'POST',
headers: {
'content-type': 'application/json',
},
};
const result = await loadTest(options);
// result.show();
console.log('Tests run successfully');
With this on server side comes: text/plain. loadtest is not aware of new header due to this lines of code. After this all works properly <3
