Skip to content

Commit 7ee49f6

Browse files
authored
Merge pull request #123 from hashicorp/f-update-readme-http-headers
README: Update with HTTP header details
2 parents b6e1d7a + 32ff7e6 commit 7ee49f6

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ from the URL before going to the final protocol downloader.
215215

216216
## Protocol-Specific Options
217217

218-
This section documents the protocol-specific options that can be specified
219-
for go-getter. These options should be appended to the input as normal query
220-
parameters. Depending on the usage of go-getter, applications may provide
221-
alternate ways of inputting options. For example, [Nomad](https://www.nomadproject.io)
222-
provides a nice options block for specifying options rather than in the URL.
218+
This section documents the protocol-specific options that can be specified for
219+
go-getter. These options should be appended to the input as normal query
220+
parameters ([HTTP headers](#headers) are an exception to this, however).
221+
Depending on the usage of go-getter, applications may provide alternate ways of
222+
inputting options. For example, [Nomad](https://www.nomadproject.io) provides a
223+
nice options block for specifying options rather than in the URL.
223224

224225
## General (All Protocols)
225226

@@ -263,6 +264,13 @@ To use HTTP basic authentication with go-getter, simply prepend `username:passwo
263264
hostname in the URL such as `https://Aladdin:[email protected]/index.html`. All special
264265
characters, including the username and password, must be URL encoded.
265266

267+
#### Headers
268+
269+
Optional request headers can be added by supplying them in a custom
270+
[`HttpGetter`](https://godoc.org/github.com/hashicorp/go-getter#HttpGetter)
271+
(_not_ as query parameters like most other options). These headers will be sent
272+
out on every request the getter in question makes.
273+
266274
### S3 (`s3`)
267275

268276
S3 takes various access configurations in the URL. Note that it will also

0 commit comments

Comments
 (0)