alexfernandez / loadtest

Runs a load test on the selected URL. Fast and easy to use. Can be integrated in your own workflow using the API.
MIT License
2.58k stars 210 forks source link

Add object in options will got an error #232

Open dashuaic opened 10 months ago

dashuaic commented 10 months ago

I added headers in options, will got an error Invalid header structure %j, it should be an array

import {loadTest} from 'loadtest'

const options = {
    url: 'http://localhost:8000',
    maxRequests: 1000,
    **headers : {
       "name": "admin"
   }**
}
const result = await loadTest(options)
result.show()
console.log('Tests run successfully')
alexfernandez commented 10 months ago

Hi! Thanks for reporting, solved in 8.0.8 just released. Let me know how it goes!