-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for custom headers downloading files #332
Comments
ewilde
added a commit
to ewilde/choco
that referenced
this issue
Jun 16, 2015
Adds the ability for packages that use Get-ChocolateyWebFile.ps1 or Get-WebFile to specify customer headers during the request. See chocolatey#332 or powershell documentation for example usage
ewilde
added a commit
to ewilde/choco
that referenced
this issue
Jun 16, 2015
Adds the ability for packages that use Get-ChocolateyWebFile.ps1 or Get-WebFile to specify customer headers during the request. See chocolatey#332 or powershell documentation for example usage
ferventcoder
added a commit
that referenced
this issue
Jun 18, 2015
(GH-332) Custom headers support for downloads
This will be released in 0.9.10 |
This was referenced Oct 16, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some web sites require specific headers to allow you to download the
setup program/zip
functions:
Get-WebFile.ps1
Get-ChocolateyWebFile.ps1
Install-ChocolateyPackage.ps1
Install-ChocolateyZipPackage.ps1
now support an options hashtable which allows use to specify individual
headers.
The options hash table structure allows for future settings to be flowed through the application without updating multiple method signatures.
The structure at the moment is:
$options = @ {
Headers = @{
Header1 = 'somevalue'; Header2 = 'somevalue'
}
}
In the future you could use the options to pass down cookies by domain for example
$options = @ {
Headers = @{
Header1 = 'somevalue'; Header2 = 'somevalue'
};
Cookies = @{
'http://domain.com' = 'value1';
'http://secure.domain.com = 'value2';
}
}
I have a PR in the works for this
The text was updated successfully, but these errors were encountered: