<commit_before>.. _aiohttp-client-reference:

HTTP Client Reference
=====================

.. highlight:: python

.. module:: aiohttp.client



Client Session
--------------

Client session is the recommended interface for making HTTP requests.

Usage example::

     >>> import aiohttp
     >>> session = aiohttp.ClientSession()
     >>> resp = yield from session.get('http://python.org')
     >>> resp
     <ClientResponse(python.org/) [200]>
     >>> data = yield from resp.read()


.. class:: ClientSession(*, connector=None, loop=None, request_class=None,\
                          response_class=None, cookies=None, headers=None,\
                          auth=None)

   The class for creating client sessions and making requests.<commit_msg>Add versionadded directive for ClientSession doc<commit_after>.. _aiohttp-client-reference:

HTTP Client Reference
=====================

.. highlight:: python

.. module:: aiohttp.client



Client Session
--------------

Client session is the recommended interface for making HTTP requests.

Usage example::

     >>> import aiohttp
     >>> session = aiohttp.ClientSession()
     >>> resp = yield from session.get('http://python.org')
     >>> resp
     <ClientResponse(python.org/) [200]>
     >>> data = yield from resp.read()

.. versionadded:: 0.15.2


.. class:: ClientSession(*, connector=None, loop=None, request_class=None,\
                          response_class=None, cookies=None, headers=None,\
                          auth=None)

   The class for creating client sessions and making requests.
{'fraction_non_alphanumeric': 0.15759128763613067, 'fraction_numerical': 0.0064061499039077515, 'mean_word_length': 2.736842105263158, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2100320', 'n_tokens_mistral': 419, 'n_tokens_neox': 393, 'n_words': 118}