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 Headers #34

Merged
merged 1 commit into from
Sep 25, 2016
Merged

Support Headers #34

merged 1 commit into from
Sep 25, 2016

Conversation

freeformz
Copy link
Contributor

@freeformz freeformz commented Sep 24, 2016

Fixes #41

Decided to re-use the headers type and add the 2 methods to support
flag.Value

Decided to re-use the `headers` type and add the 2 methods to support
flag.Value
@davecheney
Copy link
Owner

@freeformz looks like your test failed because of infuriating yaml shell escaping

@@ -149,6 +159,9 @@ func visit(url *url.URL) {
if err != nil {
log.Fatalf("unable to create request: %v", err)
}
for _, h := range httpHeaders {
req.Header.Add(headerKeyValue(h))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I came from #33 . Let's merge both features. Can you handle Host header here ? Host header can not be set via req.Header.Add. It needs to set via req.Host...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ok, the host comes from the URL, see #36 for the -x flag that lets you send the request to a different iP.

davecheney added a commit that referenced this pull request Sep 25, 2016
Updates #20
Updates #30
Updates #34

In an effort to reduce the number of merge conflicts, move reponse body
processing into its own function.

readResponseBody is responsible for consuming the response body.
davecheney added a commit that referenced this pull request Sep 25, 2016
Updates #20
Updates #30
Updates #34

In an effort to reduce the number of merge conflicts, move reponse body
processing into its own function.

readResponseBody is responsible for consuming the response body.
@davecheney
Copy link
Owner

@freeformz @tcnksm in an effort to reduce the number of blocked PRs I'm going to resolve the conflicts and merge this change this evening. Please feel free to send followups/cleanups if there are things I've missed.

@davecheney davecheney merged commit fcd3bdf into davecheney:master Sep 25, 2016
amtrivedi91 added a commit to amtrivedi91/httpstat-go that referenced this pull request Sep 27, 2016
Updates davecheney#20
Updates davecheney#30
Updates davecheney#34

In an effort to reduce the number of merge conflicts, move reponse body
processing into its own function.

readResponseBody is responsible for consuming the response body.
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.

None yet

3 participants