Lines Matching refs:resp

550             % (retry_num, self._uri, resp.status))
552 resp, content = http.request(self._uri, headers=headers)
553 if resp.status < 500:
556 if resp.status in [200, 206]:
557 if 'content-location' in resp and resp['content-location'] != self._uri:
558 self._uri = resp['content-location']
562 if 'content-range' in resp:
563 content_range = resp['content-range']
566 elif 'content-length' in resp:
567 self._total_size = int(resp['content-length'])
573 raise HttpError(resp, content, uri=self._uri)
719 % (retry_num, self.method, self.uri, resp.status))
721 resp, content = http.request(str(self.uri), method=str(self.method),
723 if resp.status < 500:
727 callback(resp)
728 if resp.status >= 300:
729 raise HttpError(resp, content, uri=self.uri)
730 return self.postproc(resp, content)
803 % (retry_num, self.method, self.uri, resp.status))
805 resp, content = http.request(self.uri, method=self.method,
808 if resp.status < 500:
811 if resp.status == 200 and 'location' in resp:
812 self.resumable_uri = resp['location']
814 raise ResumableUploadError(resp, content)
823 resp, content = http.request(self.resumable_uri, 'PUT',
825 status, body = self._process_response(resp, content)
868 % (retry_num, self.method, self.uri, resp.status))
871 resp, content = http.request(self.resumable_uri, method='PUT',
877 if resp.status < 500:
880 return self._process_response(resp, content)
882 def _process_response(self, resp, content): argument
896 if resp.status in [200, 201]:
898 return None, self.postproc(resp, content)
899 elif resp.status == 308:
902 self.resumable_progress = int(resp['range'].split('-')[1]) + 1
903 if 'location' in resp:
904 self.resumable_uri = resp['location']
907 raise HttpError(resp, content, uri=self.uri)
1149 resp = httplib2.Response(msg)
1150 resp.reason = reason
1151 resp.version = int(protocol.split('/', 1)[1].replace('.', ''))
1155 return resp, content
1249 resp, content = http.request(self._batch_uri, method='POST', body=body,
1252 if resp.status >= 300:
1253 raise HttpError(resp, content, uri=self._batch_uri)
1259 header = 'content-type: %s\r\n\r\n' % resp['content-type']
1267 raise BatchError("Response not in multipart/mixed format.", resp=resp,
1311 resp, content = self._responses[request_id]
1312 if resp['status'] == '401':
1326 resp, content = self._responses[request_id]
1334 if resp.status >= 300:
1335 raise HttpError(resp, content, uri=request.uri)
1336 response = request.postproc(resp, content)
1352 def __init__(self, resp, content, postproc): argument
1361 self.resp = resp
1364 if resp is None:
1365 self.resp = httplib2.Response({'status': 200, 'reason': 'OK'})
1366 if 'reason' in self.resp:
1367 self.resp.reason = self.resp['reason']
1375 return self.postproc(self.resp, self.content)
1430 resp, content = response[:2]
1443 return HttpRequestMock(resp, content, postproc)
1527 resp, content = self._iterable.pop(0)
1539 return httplib2.Response(resp), content
1574 resp, content = request_orig(uri, method, body, headers,
1576 return resp, content
1615 resp, content = request_orig(uri, method, body, headers,
1617 return resp, content