MCPcopy Index your code
hub / github.com/python/cpython / get_method

Method get_method

Lib/urllib/request.py:350–353  ·  view source on GitHub ↗

Return a string indicating the HTTP request method.

(self)

Source from the content-addressed store, hash-verified

348 self.host = unquote(self.host)
349
350 def get_method(self):
351 """Return a string indicating the HTTP request method."""
352 default_method = "POST" if self.data is not None else "GET"
353 return getattr(self, 'method', default_method)
354
355 def get_full_url(self):
356 return self.full_url

Callers 7

test_default_valuesMethod · 0.95
test_with_method_argMethod · 0.95
openMethod · 0.95
redirect_requestMethod · 0.45
get_authorizationMethod · 0.45
_get_content_lengthMethod · 0.45
do_openMethod · 0.45

Calls

no outgoing calls

Tested by 2

test_default_valuesMethod · 0.76
test_with_method_argMethod · 0.76