MCPcopy Index your code
hub / github.com/encode/django-rest-framework / get

Method get

rest_framework/test.py:182–193  ·  view source on GitHub ↗
(self, path, data=None, **extra)

Source from the content-addressed store, hash-verified

180 return ret, content_type
181
182 def get(self, path, data=None, **extra):
183 r = {
184 'QUERY_STRING': urlencode(data or {}, doseq=True),
185 }
186 if not data and '?' in path:
187 # Fix to support old behavior where you have the arguments in the
188 # url. See #1461.
189 query_string = force_bytes(path.split('?')[1])
190 query_string = query_string.decode('iso-8859-1')
191 r['QUERY_STRING'] = query_string
192 r.update(extra)
193 return self.generic('GET', path, **r)
194
195 def post(self, path, data=None, format=None, content_type=None, **extra):
196 data, content_type = self._encode_data(data, format, content_type)

Calls 2

genericMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected