-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add Support for setting headers #204
base: master
Are you sure you want to change the base?
Conversation
Update user event lists to support passing in an ETag value
Support passing in headers to Tentacat
ETag actually only works for list and public list.
Hey thanks for the PR! Will have a look this week! Cheers! |
defp extra_headers do | ||
Application.get_env(:tentacat, :extra_headers, []) | ||
defp extra_headers(headers) do | ||
Application.get_env(:tentacat, :extra_headers, headers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if here we would like to concatenate extra_headers
with headers
?
I think the PR looks good for what it does. Would we like to support passing etag as a more generic option so that any Tentacat function could potentially pass etag as an option instead of the raw header? The etag option would ultimately build the appropriate header ? |
Sorry, was distracted the last few weeks. Yes, I can look at implementing more generically in options. |
Just so I understand, you are referring to something more like
|
Hi @jgchristopher ! Yeah that's pretty much what I had in mind. These optional arguments can be sent from basically any API call that we need to and it's extensible enough that we don't end up with tons of arguments that are mostly optional? What do you think? |
I specifically wanted to be able to set the "If-None-Match" header using a previously received ETag.
I updated all of the User Event list functions.