def make_get_request(self, client, params=None, **keargs): """Make the request to the endpoint and return the content and status. """ response = client.get(self.url, ) content = parse_response_content(response) status = response.status_code return content, status
def make_post_request(self, client, params=None, **kwargs): """ Make the request to the endpoint and return the content and status """ headers = {'content_type': 'application/json'} response = client.get(self.url, **headers) content = parse_response_content(response) status = response.status_code return content, status
def make_post_request(self, client, params=None, **keargs): """ Make the request to the endpoint and return the content and status """ headers = {'content_type': 'application/json'} i_params = params or [] body = json.dumps(i_params) response = client.post(self.url, body, **headers) content = parse_response_content(response) status = response.status_code return content, status
def make_get_request(self, client, params=None, **kwargs): """ Make the request to the endpoint and return the content and status """ headers = {'content_type': 'application/json'} i_params = params or {} response = client.get(self.get_url(i_params.pop('hotel_id', None)), **headers) content = parse_response_content(response) status = response.status_code return content, status