Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add user-agent headers to client requests #113

Merged
merged 2 commits into from
May 20, 2021
Merged

add user-agent headers to client requests #113

merged 2 commits into from
May 20, 2021

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

@@ -47,12 +49,21 @@ class BaseAPI(object):
Basic api class for
"""

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
# for free to join this conversation on GitHub. Already have an account? # 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