Tornado 6.1 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • Twisted may be used with the classes in tornado Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And native coroutine: 14 Chapter 6. Documentation Tornado Documentation, Release 6.1 from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 245 页 | 904.24 KB | 1 年前3Tornado 6.0 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • Twisted may be used with the classes in tornado Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 245 页 | 885.76 KB | 1 年前3Tornado 5.1 Documentation
the following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • Twisted may be used with the classes in tornado Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And native coroutine: 12 Chapter 5. Documentation Tornado Documentation, Release 5.1.1 from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 243 页 | 895.80 KB | 1 年前3Tornado 6.5 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.2 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 260 页 | 1.06 MB | 1 年前3Tornado 6.4 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.4 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 268 页 | 1.09 MB | 1 年前3Tornado 6.3 Documentation
The following optional packages may be useful: • pycurl is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. • pycares is an alternative non-blocking DNS resolver Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response.body And And here is the same function rewritten asynchronously as a native coroutine: from tornado.httpclient import AsyncHTTPClient async def asynchronous_fetch(url): http_client = AsyncHTTPClient() response0 码力 | 264 页 | 1.06 MB | 1 年前3Tornado 5.1 Documentation
packages may be useful: pycurl [http://pycurl.sourceforge.net] is used by the optional tornado.curl_httpclient. Libcurl version 7.22 or higher is required. Twisted [http://www.twistedmatrix.com] may be used to the browser HTTP servers and clients tornado.httpserver — Non-blocking HTTP server tornado.httpclient — Asynchronous HTTP client tornado.httputil — Manipulate HTTP headers and URLs tornado.http1connection Examples Here is a sample synchronous function: from tornado.httpclient import HTTPClient def synchronous_fetch(url): http_client = HTTPClient() response = http_client.fetch(url) return response0 码力 | 359 页 | 347.32 KB | 1 年前3
共 335 条
- 1
- 2
- 3
- 4
- 5
- 6
- 34