Пример #1
0
 def delete(self, body=None, url=None, **kwargs):
     new_url = self._construct_url(url=url, **kwargs)
     if body:
         return Response(
             requests.delete(new_url, json=body, headers=self.header))
     else:
         return Response(requests.delete(new_url, headers=self.header))
Пример #2
0
 def put(self, body=None, url=None, **kwargs):
     new_url = self._construct_url(url=url, **kwargs)
     if body:
         self._fix_body(body)
         return Response(
             requests.put(new_url, json=body, headers=self.header))
     else:
         return Response(requests.put(new_url, headers=self.header))