Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs/en/docs/advanced/response-directly.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ For example, you cannot put a Pydantic model in a `JSONResponse` without first c

For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:

```Python hl_lines="6-7 21-22"
{!../../docs_src/response_directly/tutorial001.py!}
```
{* ../../docs_src/response_directly/tutorial001.py hl[6:7,21:22] *}

/// note | "Technical Details"

Expand All @@ -56,9 +54,7 @@ Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML"

You could put your XML content in a string, put that in a `Response`, and return it:

```Python hl_lines="1 18"
{!../../docs_src/response_directly/tutorial002.py!}
```
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *}

## Notes

Expand Down