Skip to content
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 #329

Closed
wants to merge 2 commits into from

Conversation

ewilde
Copy link
Contributor

@ewilde ewilde commented Jun 14, 2015

Resubmitting pull request from: chocolatey-archive/chocolatey#171
Implements issue: #246

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';
   }   
}

@ferventcoder
Copy link
Member

@ewilde This is close to what I was thinking, but @patrickmaurer was taking your changes and applying them here, so he didn't feel comfortable signing the CLA. For this to move forward he would have to sign the CLA because of the way you've resubmitted this. I would prefer the commits be from you and the commit messages be appropriate to a github issue. Can you make those changes?

@ewilde
Copy link
Contributor Author

ewilde commented Jun 14, 2015

@ferventcoder sure thing I'll create a new issue and PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants