Comments (4)
Seems like the fix is to create request object after option headers are set (contrary to examples in README.md).
options.headers['Content-Length'] = message.length;
options.headers['Content-Type'] = 'application/json';
var request = client(options, callback);
request.write(message);
request.end();
from loadtest.
Thanks for that! Care to send a pull request?
from loadtest.
Strangely it does not fix lib/request-generator.js test. Should figure out what's wrong with it first.
testRequestGenerator: Uncaught exception: Error: socket hang up
at createHangUpError (_http_client.js:215:15)
at Socket.socketOnEnd (_http_client.js:300:23)
at Socket.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
The error appears to be random, sometimes it's present, sometimes it's not.
from loadtest.
Closing, please reopen if needed.
from loadtest.
Related Issues (20)
- node:events:505 throw er; // Unhandled 'error' event HOT 12
- LoadRunner HOT 1
- Displaying political slogans after installing loadtest HOT 7
- How to send multiple headers
- INFO Errors: 10, accumulated errors: 10, 0.2% of total requests HOT 2
- Callback function is not called by anyone, possible dead code HOT 2
- Cannot find package microprofiler imported from /node_modules/loadtest/lib/parser.js HOT 1
- use it globally installed with a generator.js in current dir? HOT 1
- Concurrent Clients mismatch HOT 6
- POST-file has not imported javascript file correctly
- Command-line hanging / not exiting on completion HOT 3
- Can't import in ESM project HOT 1
- Add object in options will got an error HOT 1
- Configuration result is immutable HOT 2
- TypeError: Cannot read property 'id' of undefined HOT 2
- Not handling null 'result' value in statusCallback HOT 1
- SyntaxError: Unexpected reserved word HOT 1
- Readme is incorrect in terms of --cores HOT 1
- Number of total requests is incorrect HOT 1
- docs outdated? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loadtest.