Skip to content

add user-agent headers to client requests#113

Merged
displague merged 2 commits intomasterfrom
add-user-agent
May 20, 2021
Merged

add user-agent headers to client requests#113
displague merged 2 commits intomasterfrom
add-user-agent

Conversation

@displague
Copy link
Member

@displague displague commented Apr 22, 2021

Fixes #104

@displague displague requested a review from mmlb April 23, 2021 06:52
mmlb
mmlb previously approved these changes May 13, 2021
Copy link
Contributor

@mmlb mmlb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, little bit of stylistic feedback but not worth blocking on

"""

def __init__(self, auth_token, consumer_token):
def __init__(self, auth_token, consumer_token, user_agent=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change the default case to

Suggested change
def __init__(self, auth_token, consumer_token, user_agent=None):
def __init__(self, auth_token, consumer_token, user_agent=""):

then you don't need the nested format call below.

mmlb
mmlb previously approved these changes May 18, 2021
displague added 2 commits May 19, 2021 21:10
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
@displague displague merged commit 8cdc676 into master May 20, 2021
@displague displague deleted the add-user-agent branch May 20, 2021 01:15
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.

User-Agent should be configurable in clients and transmitted on requests

2 participants