# Standard library imports
import atexit

# Local imports
from uplink.clients import register, interfaces

# Third party imports
import requests


@register.handler
def _requests_handler(client):
    if isinstance(client, requests.Session):
        return RequestsClient(session=client)


class RequestsClient(interfaces.HttpClientAdapter):
    def __init__(self, session=None):
        if session is None:
            session = requests.Session()
            atexit.register(session.close)
        self._session = session

    def create_request(self):
        return Request(self._session)


class Request(interfaces.Request):

    def __init__(self, session):
        self._session = session
        self._callback = None

    def send(self, method, url, extras):
        response = self._session.request(
            method=method,
            url=url,
            **extras
        )
        if self._callback is not None:
            response = self._callback(response)
        return response

    def add_callback(self, callback):
        self._callback = callback

@@ -144,83 +144,128 @@
 s%0A%0A%0A
-@register.handler%0Adef _requests_handler(client):%0A    if isinstance(client, 
+class RequestsClient(interfaces.HttpClientAdapter):%0A    %22%22%22%0A    A :py:mod:%60requests%60 client that returns%0A    :py:class:%60
 requ
@@ -273,117 +273,276 @@
 sts.
-Session):%0A        return RequestsClient(session=client)%0A%0A%0Aclass RequestsClient(interfaces.HttpClientAdapter):
+Response%60 responses.%0A%0A    Args:%0A        session (:py:class:%60requests.Session%60, optional): The session%0A            that should handle sending requests. If this argument is%0A            omitted or set to :py:obj:%60None%60, a new session will be%0A            created.%0A    %22%22%22%0A
 %0A   
@@ -790,16 +790,215 @@
 ssion)%0A%0A
+    @staticmethod%0A    @register.handler%0A    def with_session(session, *args, **kwargs):%0A        if isinstance(session, requests.Session):%0A            return RequestsClient(session, *args, **kwargs)%0A%0A
 %0Aclass R

Update documentation for `RequestsClient`