-
Notifications
You must be signed in to change notification settings - Fork 377
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
Support Headers #34
Conversation
Decided to re-use the `headers` type and add the 2 methods to support flag.Value
@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)) |
There was a problem hiding this comment.
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
...
There was a problem hiding this comment.
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.
@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. |
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.
Fixes #41
Decided to re-use the
headers
type and add the 2 methods to supportflag.Value