Skip to content

Commit

Permalink
print host in request
Browse files Browse the repository at this point in the history
  • Loading branch information
darshanime committed Apr 25, 2020
1 parent 46f8524 commit 836d02b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion print/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

func RequestToString(req *http.Request) string {
var str strings.Builder
str.WriteString(req.Method + " " + req.URL.String() + "\n")
str.WriteString(req.Method + " " + req.Host + req.URL.String() + "\n")
for key, val := range req.Header {
str.WriteString(key + ": " + strings.Join(val, ",") + "\n")
}
Expand Down

0 comments on commit 836d02b

Please sign in to comment.