Skip to content

Commit

Permalink
added ability to send any Сontent-Type headers (#15)
Browse files Browse the repository at this point in the history
* added ability to send any Сontent-Type headers

* delete request.Header.Set(Connection, close)
  • Loading branch information
oburova authored and luza committed Aug 19, 2019
1 parent c14cadf commit 13e66a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runner/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ func newRequest(host string, test models.TestInterface) (*http.Request, error) {
request.AddCookie(&http.Cookie{Name: k, Value: v})
}

request.Header.Set("Content-Type", "application/json")
request.Header.Set("Connection", "close")
if request.Header.Get("Content-Type") == "" {
request.Header.Set("Content-Type", "application/json")
}

return request, nil
}
Expand Down

0 comments on commit 13e66a2

Please sign in to comment.