class_docstr: Non-blocking HTTP client with no external dependencies.
  
  This class implements an HTTP 1.1 client on top of Tornado's IOStreams.
  Some features found in the curl-based AsyncHTTPClient are not yet
  supported.  In particular, proxies are not supported, connections
  are not reused, and callers cannot select the network interface to be
  used.
class_docstr_tok: ["Non-blocking","HTTP","client","with","no","external","dependencies",".","This","class","implements","an","HTTP","1.1","client","on","top","of","Tornado","'s","IOStreams",".","Some","features","found","in","the","curl-based","AsyncHTTPClient","are","not","yet","supported",".","In","particular",",","proxies","are","not","supported",",","connections","are","not","reused",",","and","callers","can","not","select","the","network","interface","to","be","used","."]
docstr: Creates a AsyncHTTPClient.
  
  Only a single AsyncHTTPClient instance exists per IOLoop
  in order to provide limitations on the number of pending connections.
  ``force_instance=True`` may be used to suppress this behavior.
  
  Note that because of this implicit reuse, unless ``force_instance``
  is used, only the first call to the constructor actually uses
  its arguments. It is recommended to use the ``configure`` method
  instead of the constructor to ensure that arguments take effect.
  
  ``max_clients`` is the number of concurrent requests that can be
  in progress; when this limit is reached additional requests will be
  queued. Note that time spent waiting in this queue still counts
  against the ``request_timeout``.
  
  ``hostname_mapping`` is a dictionary mapping hostnames to IP addresses.
  It can be used to make local DNS changes when modifying system-wide
  settings like ``/etc/hosts`` is not possible or desirable (e.g. in
  unittests).
  
  ``max_buffer_size`` (default 100MB) is the number of bytes
  that can be read into memory at once. ``max_body_size``
  (defaults to ``max_buffer_size``) is the largest response body
  that the client will accept.  Without a
  ``streaming_callback``, the smaller of these two limits
  applies; with a ``streaming_callback`` only ``max_body_size``
  does.
  
  .. versionchanged:: 4.2
     Added the ``max_body_size`` argument.
docstr_tok: ["Creates","a","AsyncHTTPClient",".","Only","a","single","AsyncHTTPClient","instance","exists","per","IOLoop","in","order","to","provide","limitations","on","the","number","of","pending","connections",".","``","force_instance=True","``","may","be","used","to","suppress","this","behavior",".","Note","that","because","of","this","implicit","reuse",",","unless","``","force_instance","``","is","used",",","only","the","first","call","to","the","constructor","actually","uses","its","arguments",".","It","is","recommended","to","use","the","``","configure","``","method","instead","of","the","constructor","to","ensure","that","arguments","take","effect",".","``","max_clients","``","is","the","number","of","concurrent","requests","that","can","be","in","progress",";","when","this","limit","is","reached","additional","requests","will","be","queued",".","Note","that","time","spent","waiting","in","this","queue","still","counts","against","the","``","request_timeout","``",".","``","hostname_mapping","``","is","a","dictionary","mapping","hostnames","to","IP","addresses",".","It","can","be","used","to","make","local","DNS","changes","when","modifying","system-wide","settings","like","``","\/etc\/hosts","``","is","not","possible","or","desirable","(","e.g",".","in","unittests",")",".","``","max_buffer_size","``","(","default","100MB",")","is","the","number","of","bytes","that","can","be","read","into","memory","at","once",".","``","max_body_size","``","(","defaults","to","``","max_buffer_size","``",")","is","the","largest","response","body","that","the","client","will","accept",".","Without","a","``","streaming_callback","``",",","the","smaller","of","these","two","limits","applies",";","with","a","``","streaming_callback","``","only","``","max_body_size","``","does",".","..","versionchanged",":",":","4.2","Added","the","``","max_body_size","``","argument","."]
code: def initialize(
      self,
      io_loop,
      max_clients=10,
      hostname_mapping=None,
      max_buffer_size=104857600,
      resolver=None,
      defaults=None,
      max_header_size=None,
      max_body_size=None,
  ):
      """Creates a AsyncHTTPClient.
  
      Only a single AsyncHTTPClient instance exists per IOLoop
      in order to provide limitations on the number of pending connections.
      ``force_instance=True`` may be used to suppress this behavior.
  
      Note that because of this implicit reuse, unless ``force_instance``
      is used, only the first call to the constructor actually uses
      its arguments. It is recommended to use the ``configure`` method
      instead of the constructor to ensure that arguments take effect.
  
      ``max_clients`` is the number of concurrent requests that can be
      in progress; when this limit is reached additional requests will be
      queued. Note that time spent waiting in this queue still counts
      against the ``request_timeout``.
  
      ``hostname_mapping`` is a dictionary mapping hostnames to IP addresses.
      It can be used to make local DNS changes when modifying system-wide
      settings like ``/etc/hosts`` is not possible or desirable (e.g. in
      unittests).
  
      ``max_buffer_size`` (default 100MB) is the number of bytes
      that can be read into memory at once. ``max_body_size``
      (defaults to ``max_buffer_size``) is the largest response body
      that the client will accept.  Without a
      ``streaming_callback``, the smaller of these two limits
      applies; with a ``streaming_callback`` only ``max_body_size``
      does.
  
      .. versionchanged:: 4.2
         Added the ``max_body_size`` argument.
      """
      super(SimpleAsyncHTTPClient, self).initialize(
          io_loop, defaults=defaults
      )
      self.max_clients = max_clients
      self.queue = collections.deque()
      self.active = {}
      self.waiting = {}
      self.max_buffer_size = max_buffer_size
      self.max_header_size = max_header_size
      self.max_body_size = max_body_size
      # TCPClient could create a Resolver for us, but we have to do it
      # ourselves to support hostname_mapping.
      if resolver:
          self.resolver = resolver
          self.own_resolver = False
      else:
          self.resolver = Resolver(io_loop=io_loop)
          self.own_resolver = True
      if hostname_mapping is not None:
          self.resolver = OverrideResolver(
              resolver=self.resolver, mapping=hostname_mapping
          )
      self.tcp_client = TCPClient(
          resolver=self.resolver, io_loop=io_loop
      )
  
imports: from __future__ import absolute_import, division, print_function
  from tornado.escape import utf8, _unicode
  from tornado import gen
  from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
  from tornado import httputil
  from tornado.http1connection import HTTP1Connection, HTTP1ConnectionParameters
  from tornado.iostream import StreamClosedError
  from tornado.netutil import Resolver, OverrideResolver, _client_ssl_defaults
  from tornado.log import gen_log
  from tornado import stack_context
  from tornado.tcpclient import TCPClient
  from tornado.util import PY3
  import base64
  import collections
  import copy
  import functools
  import re
  import socket
  import sys
  from io import BytesIO
label_desc: Use image node_id 1 for calling the SimpleAsyncHTTPClient obj's underlying member method code with example usage: obj.initialize(io_loop, max_clients, hostname_mapping, max_buffer_size, resolver, defaults, max_header_size, max_body_size) without return types