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

Commit124abab

Browse files
nejchJohnVillalovos
authored andcommitted
chore: use kwargs for http_request docs
1 parentb4d53f1 commit124abab

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎docs/api-levels.rst‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,19 @@ For example, if for whatever reason you want to fetch allowed methods for an end
8686
8787
>>> gl= gitlab.Gitlab(private_token=private_token)
8888
>>>
89-
>>> response= gl.http_request("OPTIONS","/projects")
89+
>>> response= gl.http_request(verb="OPTIONS",path="/projects")
9090
>>> response.headers["Allow"]
9191
'OPTIONS, GET, POST, HEAD'
9292
9393
Or get the total number of a user's events with a customized HEAD request:
9494

9595
..code-block::python
9696
97-
>>> response= gl.http_request("HEAD","/events",query_params={"sudo":"some-user"},timeout=10)
97+
>>> response= gl.http_request(
98+
verb="HEAD",
99+
path="/events",
100+
query_params={"sudo":"some-user"},
101+
timeout=10
102+
)
98103
>>> response.headers["X-Total"]
99104
'123'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp