def _get_http_extension( self, http_verb: str, http_querystring: Optional[MetadataTuple] = () ) -> common_v1.HTTPExtension: # type: ignore verb = common_v1.HTTPExtension.Verb.Value(http_verb) # type: ignore http_ext = common_v1.HTTPExtension(verb=verb) for key, val in http_querystring: # type: ignore http_ext.querystring[key] = val return http_ext
def _get_http_extension( self, http_verb: str, http_querystring: Optional[MetadataTuple] = () ) -> common_v1.HTTPExtension: # type: ignore verb = common_v1.HTTPExtension.Verb.Value(http_verb) # type: ignore http_ext = common_v1.HTTPExtension(verb=verb) if http_querystring is not None and len(http_querystring): http_ext.querystring = urlencode(http_querystring) return http_ext