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))
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))