| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b4d53f1 commit 124abab
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,14 +86,19 @@ For example, if for whatever reason you want to fetch allowed methods for an end | |||
| 86 | 86 | ||
| 87 | 87 | >>> gl = gitlab.Gitlab(private_token=private_token) | |
| 88 | 88 | >>> | |
| 89 | - >>> response = gl.http_request("OPTIONS", "/projects") | ||
| 89 | + >>> response = gl.http_request(verb="OPTIONS", path="/projects") | ||
| 90 | 90 | >>> response.headers["Allow"] | |
| 91 | 91 | 'OPTIONS, GET, POST, HEAD' | |
| 92 | 92 | ||
| 93 | 93 | Or get the total number of a user's events with a customized HEAD request: | |
| 94 | 94 | ||
| 95 | 95 | .. code-block:: python | |
| 96 | 96 | ||
| 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 | + ) | ||
| 98 | 103 | >>> response.headers["X-Total"] | |
| 99 | 104 | '123' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments