| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8f8611a commit 90635a7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -805,6 +805,27 @@ def http_get( | |||
| 805 | 805 | else: | |
| 806 | 806 | return result | |
| 807 | 807 | ||
| 808 | + def http_head( | ||
| 809 | + self, path: str, query_data: Optional[Dict[str, Any]] = None, **kwargs: Any | ||
| 810 | + ) -> requests.structures.CaseInsensitiveDict: | ||
| 811 | + """Make a HEAD request to the Gitlab server. | ||
| 812 | + | ||
| 813 | + Args: | ||
| 814 | + path: Path or full URL to query ('/projects' or | ||
| 815 | + 'http://whatever/v4/api/projecs') | ||
| 816 | + query_data: Data to send as query parameters | ||
| 817 | + **kwargs: Extra options to send to the server (e.g. sudo, page, | ||
| 818 | + per_page) | ||
| 819 | + Returns: | ||
| 820 | + A requests.header object | ||
| 821 | + Raises: | ||
| 822 | + GitlabHttpError: When the return code is not 2xx | ||
| 823 | + """ | ||
| 824 | + | ||
| 825 | + query_data = query_data or {} | ||
| 826 | + result = self.http_request("head", path, query_data=query_data, **kwargs) | ||
| 827 | + return result.headers | ||
| 828 | + | ||
| 808 | 829 | def http_list( | |
| 809 | 830 | self, | |
| 810 | 831 | path: str, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments