Repository: aio-libs/aiohttp

Issue:
Missing raise_for_status parameter to aiohttp.request
## Missing raise_for_status parameter to aiohttp.request
Well the title stands for itself.
Documentation on [aiohttp.request](https://docs.aiohttp.org/en/stable/client_reference.html#basic-api) stands, that this method have argument `raise_for_status`, which was added in version 3.4. 
But looking into [current code](https://github.com/aio-libs/aiohttp/blob/044996a59ad574c101bb4fe5c47a78f6dc0067cc/aiohttp/client.py#L892) of file `aiohttp.client.py` shows that this method do not have such argument.

## Expected behaviour

Expected that this code will work like a charm:
```python
import aiohttp
async with aiohttp.request('GET', 'www.example.com', raise_for_status=True, ) as response:
    pass
```

## Actual behaviour

Get type error:
```python
TypeError: request() got an unexpected keyword argument 'raise_for_status'
```

## Steps to reproduce
```python
import aiohttp
import asyncio

async def fetch():
    async with aiohttp.request('GET', 'http://python.org/', raise_for_status=True) as resp:
        assert resp.status == 200
        print(resp.status)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(fetch())
```

## Your environment
aiohttp==3.4.4
Client



Discussion:
[GitMate.io](https://gitmate.io) thinks possibly related issues are https://github.com/aio-libs/aiohttp/issues/432 (asyncio.wait_for throwing a timeout error on aiohttp.request?), https://github.com/aio-libs/aiohttp/issues/168 (aiohttp.web missing), https://github.com/aio-libs/aiohttp/issues/1403 ([QUESTION] aiohttp.ClientSession.request('GET') issue), https://github.com/aio-libs/aiohttp/issues/2878 (Add argument 'raise_for_status' to 'ClientSession' request method.), and https://github.com/aio-libs/aiohttp/issues/2920 (AIOHttp failing after some requests).
Makes sense.
Would you provide a Pull Request?
Yep. Will try to do something on this holidays

Resolving patch:
diff --git a/aiohttp/client.py b/aiohttp/client.py
--- a/aiohttp/client.py
+++ b/aiohttp/client.py
@@ -903,6 +903,7 @@ def request(method, url, *,
             compress=None,
             chunked=None,
             expect100=False,
+            raise_for_status=False,
             connector=None,
             loop=None,
             read_until_eof=True,
@@ -965,6 +966,7 @@ def request(method, url, *,
                          compress=compress,
                          chunked=chunked,
                          expect100=expect100,
+                         raise_for_status=raise_for_status,
                          read_until_eof=read_until_eof,
                          proxy=proxy,
                          proxy_auth=proxy_auth,),


Test patch:
diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py
--- a/tests/test_client_functional.py
+++ b/tests/test_client_functional.py
@@ -2083,6 +2083,45 @@ async def handler_redirect(request):
     resp.close()
 
 
+async def test_request_raise_for_status_default(aiohttp_server) -> None:
+    async def handler(request):
+        raise web.HTTPBadRequest()
+
+    app = web.Application()
+    app.router.add_get('/', handler)
+    server = await aiohttp_server(app)
+
+    async with aiohttp.request('GET', server.make_url('/')) as resp:
+        assert resp.status == 400
+
+
+async def test_request_raise_for_status_disabled(aiohttp_server) -> None:
+    async def handler(request):
+        raise web.HTTPBadRequest()
+
+    app = web.Application()
+    app.router.add_get('/', handler)
+    server = await aiohttp_server(app)
+    url = server.make_url('/')
+
+    async with aiohttp.request('GET', url, raise_for_status=False) as resp:
+        assert resp.status == 400
+
+
+async def test_request_raise_for_status_enabled(aiohttp_server) -> None:
+    async def handler(request):
+        raise web.HTTPBadRequest()
+
+    app = web.Application()
+    app.router.add_get('/', handler)
+    server = await aiohttp_server(app)
+    url = server.make_url('/')
+
+    with pytest.raises(aiohttp.ClientResponseError):
+        async with aiohttp.request('GET', url, raise_for_status=True):
+            assert False, "never executed"  # pragma: no cover
+
+
 async def test_invalid_idna() -> None:
     session = aiohttp.ClientSession()
     try: