-
Notifications
You must be signed in to change notification settings - Fork 187
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
support client certificates when communicating with REQ_URL #335
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Syed Nihal <syed.nihal@nokia.com>
Hi @ChristianGeie, could you please let me know if this is an acceptable feature by the community? I shall add some tests related to it. |
# If method is not provided use GET as default | ||
if method == "GET" or not method: | ||
res = r.get("%s" % url, auth=auth, timeout=REQ_TIMEOUT, verify=REQ_TLS_VERIFY) | ||
res = r.get("%s" % url, cert=cert, auth=auth, timeout=REQ_TIMEOUT, verify=REQ_TLS_VERIFY) |
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.
can cert be None?
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.
Yes, the default value is None
for cert if not specified.
Reference: https://docs.python-requests.org/en/latest/_modules/requests/sessions/#Session
please add some tests :-) |
Signed-off-by: wasim-nihal <sswasim64@gmail.com>
Hi @tomrk-esteam8 / @ChristianGeie, I have added some tests related to this feature. Could you please take a look? |
Signed-off-by: wasim-nihal <sswasim64@gmail.com>
Signed-off-by: wasim-nihal <sswasim64@gmail.com>
see #334