forked from digitalocean/godo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't set "Content-Type" header on GET requests
Updates the `NewRequest` logic to prevent the `Content-Type` header from being set on GET, HEAD, and OPTIONS requests. Also prevents a body from being set to anything other than nil for those requests. This also adds a new client initialization option that allows users to define arbitrary key value pairs that are set as HTTP headers on each request. The intent is that people can use these if they need to set extra headers when using godo behind some kind of proxy.
- Loading branch information
1 parent
4e6f6e6
commit 8c2ad8c
Showing
2 changed files
with
65 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters