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 #71

Closed
codekoala opened this issue Aug 1, 2017 · 3 comments
Closed

Support for custom headers #71

codekoala opened this issue Aug 1, 2017 · 3 comments

Comments

@codekoala
Copy link

I want to download build artifacts from a private GitLab instance using Nomad's artifact stanza. I can download the build artifacts with curl if I add a Private-Token header, but there doesn't seem to be a way to handle with go-getter right now.

@lfarnell
Copy link
Contributor

@codekoala the docs say you can pass the private token via a query parameter as well. It's not secure but it should work. Not sure how much would have to change for go-getter and nomad to support custom headers

@codekoala
Copy link
Author

@lfarnell thank you for the response! It's been a while since I worked on this (ended up pushing artifacts to S3), but I'm fairly certain I tried that query string parameter without results. I think it worked for certain part of the API, but the artifacts seemed to be an exception for everything other than the header. I will try the query parameter later tonight and report back. That would be great if it works!

One way or another, being able to specify custom headers seems like a good feature to deal with less flexible APIs.

vancluever added a commit that referenced this issue Nov 8, 2018
This adds the ability to set headers that will be sent out on every
request of a particular HttpGetter. This is useful in situations where
query parameters are not suitable, such as when headers are explicitly
expected, or when one wants to move information off the query string
that would be at risk of possibly being exposed in logs or error
messages.

Fixes #71.
@amfern
Copy link

amfern commented Mar 31, 2019

I don't think the issue was addressed, the PR doesn't allow to pass headers using Nomad's artifact stanza.

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

No branches or pull requests

3 participants