UNPKG

loadtest

Version:

Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. Includes an API for automated load testing.

10 lines (9 loc) 383 B
export default function requestGenerator(params, options, client, callback) { const message = '{"hi": "ho"}'; options.headers['Content-Length'] = message.length; options.headers['Content-Type'] = 'application/json'; options.headers['x-test-header'] = 'request-generator-module-import-test'; const request = client(options, callback); request.write(message); return request; }