Skip to content

Commit

Permalink
DOC: add example about broad URL support
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcBresson committed Dec 12, 2024
1 parent 43f0b4c commit e1251ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ what gets sent over the wire.*
>>> url = URL("https://example.org/")
>>> url.host
'example.org'

from pydantic import HttpUrl
>>> pydantic_url = HttpUrl("https://example.org/")
>>> url = URL(pydantic_url)
>>> url.host
'example.org'
```

* `def __init__(url, **kwargs)`
Expand Down

0 comments on commit e1251ff

Please sign in to comment.