(self, url, timeout=5, options=None)
| 869 | return self.curl_raw(url, timeout, options) |
| 870 | |
| 871 | def curl_protocol_version(self, url, timeout=5, options=None): |
| 872 | if not options: |
| 873 | options = [] |
| 874 | options.extend(["-w", "%{http_version}\n", "-o", "/dev/null"]) |
| 875 | r = self.curl_raw(url, timeout=timeout, options=options) |
| 876 | if r.exit_code == 0 and r.response: |
| 877 | return r.response["body"].decode('utf-8').rstrip() |
| 878 | return -1 |
| 879 | |
| 880 | def nghttp(self): |
| 881 | return Nghttp(self._nghttp, connect_addr=self._httpd_addr, |