Skip to content

Commit

Permalink
docs: rst formatting.....
Browse files Browse the repository at this point in the history
  • Loading branch information
euri10 committed Feb 6, 2025
1 parent b3f05a6 commit e2d720b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/migration/fastapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ In FastAPI, you specify the response type using `-> HTMLResponse` for instance.
:sync: litestar

.. code-block:: python
from litestar.enums import MediaType
@get(path="/page", media_type=MediaType.HTML)
Expand Down Expand Up @@ -387,6 +388,7 @@ In FastAPI, the `url_for` function automatically gets the endpoint name. In Lite
.. code-block:: html

<a href="{{ url_for('blabla') }}">Blabla</a>

Uploads
~~~~~~~
In FastAPI, you use the `File` class to handle file uploads. In Litestar, you use the `data` keyword argument with `Body` and specify the `media_type` as `RequestEncodingType.MULTI_PART`.
Expand Down

0 comments on commit e2d720b

Please sign in to comment.