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

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

mmlb
mmlb previously approved these changes May 13, 2021
Copy link
Member

@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
Member

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.

packet/baseapi.py Outdated Show resolved Hide resolved
mmlb
mmlb previously approved these changes May 18, 2021
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
Signed-off-by: Marques Johansson <mjohansson@equinix.com>
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