(self, host, handler, request_body, debug)
| 1250 | # @return An HTTPConnection. |
| 1251 | |
| 1252 | def send_request(self, host, handler, request_body, debug): |
| 1253 | connection = self.make_connection(host) |
| 1254 | headers = self._headers + self._extra_headers |
| 1255 | if debug: |
| 1256 | connection.set_debuglevel(1) |
| 1257 | if self.accept_gzip_encoding and gzip: |
| 1258 | connection.putrequest("POST", handler, skip_accept_encoding=True) |
| 1259 | headers.append(("Accept-Encoding", "gzip")) |
| 1260 | else: |
| 1261 | connection.putrequest("POST", handler) |
| 1262 | headers.append(("Content-Type", "text/xml")) |
| 1263 | headers.append(("User-Agent", self.user_agent)) |
| 1264 | self.send_headers(connection, headers) |
| 1265 | self.send_content(connection, request_body) |
| 1266 | return connection |
| 1267 | |
| 1268 | ## |
| 1269 | # Send request headers. |
no test coverage detected