wrk2 icon indicating copy to clipboard operation
wrk2 copied to clipboard

Improvement - testing request

Open lunemec opened this issue 7 years ago • 0 comments

Hello,

I'm using wrk for testing of my apps regularly, and I find it awesome. One thing I'd like to be better is the testing request creation. I'm using the lua scripts for this, but could something like this be done?

Request:

echo -e 'GET /list HTTP/1.1\r\nContent-Type: application/json\r\nHost: localhost\r\nBODY DATA\r\n\r\n' | wrk http://localhost

This would allow me to craft any HTTP request (in any tool) and just copy&paste it to the terminal and be sure that wrk will create exactly this request for testing. Because sometimes when testing something behind Nginx proxy, instead of testing the app, you're actually testing the proxy, because it returns 302 Moved for some redirect. This is usually caused by incorrectly crafted request.

Do you think this would be possible, and worthwile doing?

Thanks!

lunemec avatar Dec 15 '16 08:12 lunemec