Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the Content-Type request header. #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

biztos
Copy link

@biztos biztos commented Sep 29, 2015

Hi there! I was trying out gobench and my target server was rejecting POST requests due to a bad Content-Type request header. This was trivial to fix so I forked and added that support. Please consider merging this in, as I am sure there are others who would need this feature.

Added -type option for Content-Type with default.

When load-testing with POST requests, the server often cares what the content
type is, i.e it needs a Content-Type header in the request. This change adds
the option to set that explicitly with the -type flag, which you might use
for testing raw JSON payloads as well as file uploads; and a sane default if
there is POST data to send:

    Content-Type: application/x-www-form-urlencoded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant