tentacat
tentacat copied to clipboard
Add Support for setting headers
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.
Coverage increased (+0.05%) to 92.145% when pulling 47cec7d3d4330a8d42067d6ab38b362c92997467 on jgchristopher:master into 6e4de63dd19ae719f2b59d4f289979a91e3cb5e2 on edgurgel:master.
Hey thanks for the PR! Will have a look this week! Cheers!
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.
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 ?
Just so I understand, you are referring to something more like
@spec list_public(Client.t(), binary, Keyword.t) :: Tentacat.response()
Tentacat.Users.Events.list(client, "bastos", [etag: "2a97f8e2fba8b548ae56bce4074f25cc00674f213963d2f8cf579b8a3"])
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?