@@ -215,11 +215,12 @@ from the URL before going to the final protocol downloader.
215
215
216
216
## Protocol-Specific Options
217
217
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.
223
224
224
225
## General (All Protocols)
225
226
@@ -263,6 +264,13 @@ To use HTTP basic authentication with go-getter, simply prepend `username:passwo
263
264
hostname in the URL such as
` https://Aladdin:[email protected] /index.html ` . All special
264
265
characters, including the username and password, must be URL encoded.
265
266
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
+
266
274
### S3 (` s3 ` )
267
275
268
276
S3 takes various access configurations in the URL. Note that it will also
0 commit comments