* `def .aiter_text()` - **async text iterator**
* `def .aiter_lines()` - **async text iterator**
* `def .aclose()` - **None**
-* `def .next()` - **Response**
+* `def .anext()` - **Response**
## `Request`
response = await client.get(url)
assert response.status_code == 200
with pytest.raises(NotRedirectResponse):
- await response.next()
+ await response.anext()
@pytest.mark.usefixtures("async_environment")
assert response.is_redirect is True
assert len(response.history) == 0
- response = await response.next()
+ response = await response.anext()
assert response.status_code == codes.OK
assert response.url == URL("https://example.org/")
assert response.is_redirect is False
response = await client.get(url, allow_redirects=False)
with pytest.raises(TooManyRedirects):
while response.is_redirect:
- response = await response.next()
+ response = await response.anext()
@pytest.mark.usefixtures("async_environment")
response = await client.get(url, allow_redirects=False)
with pytest.raises(RedirectLoop):
while response.is_redirect:
- response = await response.next()
+ response = await response.anext()
@pytest.mark.usefixtures("async_environment")