Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59ed4fc

Browse files
committed
Added HTTPauth support for even more methods :)
1 parent6220308 commit59ed4fc

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎gitlab/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,10 @@ def delete(self, obj, id=None, **kwargs):
529529
params=params,
530530
headers=headers,
531531
verify=self.ssl_verify,
532-
timeout=self.timeout)
532+
timeout=self.timeout,
533+
auth=requests.auth.HTTPBasicAuth(
534+
self.http_username,
535+
self.http_password))
533536
exceptExceptionase:
534537
raiseGitlabConnectionError(
535538
"Can't connect to GitLab server (%s)"%e)
@@ -576,7 +579,10 @@ def create(self, obj, **kwargs):
576579
r=self.session.post(url,data=data,
577580
headers=headers,
578581
verify=self.ssl_verify,
579-
timeout=self.timeout)
582+
timeout=self.timeout,
583+
auth=requests.auth.HTTPBasicAuth(
584+
self.http_username,
585+
self.http_password))
580586
exceptExceptionase:
581587
raiseGitlabConnectionError(
582588
"Can't connect to GitLab server (%s)"%e)
@@ -626,7 +632,10 @@ def update(self, obj, **kwargs):
626632
r=self.session.put(url,data=data,
627633
headers=headers,
628634
verify=self.ssl_verify,
629-
timeout=self.timeout)
635+
timeout=self.timeout,
636+
auth=requests.auth.HTTPBasicAuth(
637+
self.http_username,
638+
self.http_password))
630639
exceptExceptionase:
631640
raiseGitlabConnectionError(
632641
"Can't connect to GitLab server (%s)"%e)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp