diff --git a/CHANGES/11324.doc.rst b/CHANGES/11324.doc.rst new file mode 100644 index 00000000000..a0c7e1c3289 --- /dev/null +++ b/CHANGES/11324.doc.rst @@ -0,0 +1 @@ +Documented valid request URL forms when using :class:`~aiohttp.UnixConnector`, including ``base_url`` with an HTTP host -- by :user:`muhammad-a-dev`. diff --git a/CHANGES/13781.doc.rst b/CHANGES/13781.doc.rst new file mode 120000 index 00000000000..d1bbd06c77a --- /dev/null +++ b/CHANGES/13781.doc.rst @@ -0,0 +1 @@ +11324.doc.rst \ No newline at end of file diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index df269e16d02..e9e72254437 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -299,6 +299,7 @@ Mitchell Ferree monasco Morgan Delahaye-Prat Moss Collum +Muhammad A Dev Mun Gwan-gyeong Navid Sheikhol Nicolas Braem diff --git a/docs/client_advanced.rst b/docs/client_advanced.rst index 6d370351cad..55420e47bde 100644 --- a/docs/client_advanced.rst +++ b/docs/client_advanced.rst @@ -550,6 +550,15 @@ If your HTTP server uses UNIX domain sockets you can use conn = aiohttp.UnixConnector(path='/path/to/socket') session = aiohttp.ClientSession(connector=conn) +Request URLs continue to work much the same as any other connector. +The protocol is still HTTP, therefore the ``http://`` scheme should still be used. +While the connector always routes to the socket, the domain/port in the URL is +still used to create the ``Host`` header and must be included. +For example:: + + async with session.get('http://localhost/get') as resp: + ... + Custom socket creation ^^^^^^^^^^^^^^^^^^^^^^