MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / requestBlobAndCheck

Method requestBlobAndCheck

github/Requester.py:664–686  ·  view source on GitHub ↗

Send a request with a file for the body. :param input: path to a file to use for the request body :return: ``(headers: dict, JSON Response: Any)`` :raises: :class:`GithubException` for error status codes

(
        self,
        verb: str,
        url: str,
        parameters: dict[str, str] | None = None,
        headers: dict[str, str] | None = None,
        input: str | None = None,
        cnx: HTTPRequestsConnectionClass | HTTPSRequestsConnectionClass | None = None,
    )

Source from the content-addressed store, hash-verified

662 )
663
664 def requestBlobAndCheck(
665 self,
666 verb: str,
667 url: str,
668 parameters: dict[str, str] | None = None,
669 headers: dict[str, str] | None = None,
670 input: str | None = None,
671 cnx: HTTPRequestsConnectionClass | HTTPSRequestsConnectionClass | None = None,
672 ) -> tuple[dict[str, Any], dict[str, Any]]:
673 """
674 Send a request with a file for the body.
675
676 :param input: path to a file to use for the request body
677
678 :return: ``(headers: dict, JSON Response: Any)``
679 :raises: :class:`GithubException` for error status codes
680
681 """
682 return self.__postProcess(
683 verb,
684 url,
685 *self.__check(*self.requestBlob(verb, url, parameters, headers, input, self.__customConnection(url))),
686 )
687
688 @classmethod
689 def paths_of_dict(cls, d: dict) -> dict:

Callers 2

logs_urlMethod · 0.80
upload_assetMethod · 0.80

Calls 4

__postProcessMethod · 0.95
__checkMethod · 0.95
requestBlobMethod · 0.95
__customConnectionMethod · 0.95

Tested by

no test coverage detected