class documentation

class HTTPError(Exception):

Known subclasses: httpx.HTTPStatusError, httpx.RequestError

View In Hierarchy

Base class for RequestError and HTTPStatusError.

Useful for try...except blocks when issuing a request, and then calling .raise_for_status().

For example:

``` try:

response = httpx.get("https://www.example.com") response.raise_for_status()
except httpx.HTTPError as exc:
print(f"HTTP Exception for {exc.request.url} - {exc}")

```

Method __init__ Undocumented
def __init__(self, message):

Undocumented

Parameters
message:strUndocumented