Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for xml (0.14 sec)

  1. docs/de/docs/advanced/response-directly.md

    Sehen wir uns nun an, wie Sie damit eine benutzerdefinierte Response zurückgeben können.
    
    Nehmen wir an, Sie möchten eine <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a>-Response zurückgeben.
    
    Sie könnten Ihren XML-Inhalt als String in eine `Response` einfügen und sie zurückgeben:
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## Anmerkungen
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:19:36 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. docs/en/docs/advanced/response-directly.md

    Now, let's see how you could use that to return a custom response.
    
    Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> response.
    
    You could put your XML content in a string, put it in a `Response`, and return it:
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## Notes
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 29 14:02:58 GMT 2020
    - 3K bytes
    - Viewed (0)
  3. docs_src/response_directly/tutorial002.py

    app = FastAPI()
    
    
    @app.get("/legacy/")
    def get_legacy_data():
        data = """<?xml version="1.0"?>
        <shampoo>
        <Header>
            Apply shampoo here.
        </Header>
        <Body>
            You'll have to use soap here.
        </Body>
        </shampoo>
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 354 bytes
    - Viewed (0)
  4. docs/fr/docs/advanced/response-directly.md

    Maintenant, voyons comment vous pourriez utiliser cela pour retourner une réponse personnalisée.
    
    Disons que vous voulez retourner une réponse <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a>.
    
    Vous pouvez mettre votre contenu XML dans une chaîne de caractères, la placer dans une `Response`, et la retourner :
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## Notes
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  5. fastapi/openapi/models.py

        # Ref: OpenAPI 3.1.0: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object
        # Schema Object
        discriminator: Optional[Discriminator] = None
        xml: Optional[XML] = None
        externalDocs: Optional[ExternalDocumentation] = None
        example: Annotated[
            Optional[Any],
            typing_deprecated(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 22:49:33 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. docs/em/docs/advanced/response-directly.md

    🖼 🔛 🎦 🌐 🍕 👆 💪, ✋️ ⚫️ 🚫 📶 ⚠, 👆 💪 ✔️ 📨 `item` 🔗, &amp; **FastAPI** 🔜 🚮 ⚫️ `JSONResponse` 👆, 🏭 ⚫️ `dict`, ♒️. 🌐 👈 🔢.
    
    🔜, ➡️ 👀 ❔ 👆 💪 ⚙️ 👈 📨 🛃 📨.
    
    ➡️ 💬 👈 👆 💚 📨 <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">📂</a> 📨.
    
    👆 💪 🚮 👆 📂 🎚 🎻, 🚮 ⚫️ `Response`, &amp; 📨 ⚫️:
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## 🗒
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  7. docs/es/docs/advanced/response-directly.md

    Ahora, veamos cómo puedes usarlo para devolver una respuesta personalizada.
    
    Digamos que quieres devolver una respuesta <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a>.
    
    Podrías poner tu contenido XML en un string, ponerlo en una `Response` y devolverlo:
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## Notas
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 13 11:57:27 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  8. docs/zh/docs/advanced/response-directly.md

    上面的例子展示了需要的所有部分,但还不够实用,因为你本可以只是直接返回 `item`,而**FastAPI** 默认帮你把这个 `item` 放到 `JSONResponse` 中,又默认将其转换成了 `dict`等等。
    
    现在,让我们看看你如何才能返回一个自定义的响应。
    
    假设你想要返回一个 <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a> 响应。
    
    你可以把你的 XML 内容放到一个字符串中,放到一个 `Response` 中,然后返回。
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## 说明
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 3.1K bytes
    - Viewed (0)
  9. docs/ja/docs/advanced/response-directly.md

    上記の例では必要な部分を全て示していますが、あまり便利ではありません。`item` を直接返すことができるし、**FastAPI** はそれを `dict` に変換して `JSONResponse` に含めてくれるなど。すべて、デフォルトの動作です。
    
    では、これを使ってカスタムレスポンスをどう返すか見てみましょう。
    
    <a href="https://en.wikipedia.org/wiki/XML" class="external-link" target="_blank">XML</a>レスポンスを返したいとしましょう。
    
    XMLを文字列にし、`Response` に含め、それを返します。
    
    ```Python hl_lines="1  18"
    {!../../../docs_src/response_directly/tutorial002.py!}
    ```
    
    ## 備考
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Nov 05 22:50:38 GMT 2020
    - 3.6K bytes
    - Viewed (0)
  10. .gitignore

    .idea
    .ipynb_checkpoints
    .mypy_cache
    .vscode
    __pycache__
    .pytest_cache
    htmlcov
    dist
    site
    .coverage
    coverage.xml
    .netlify
    test.db
    log.txt
    Pipfile.lock
    env3.*
    env
    docs_build
    site_build
    venv
    docs.zip
    archive.zip
    
    # vim temporary files
    *~
    .*.sw?
    .cache
    
    # macOS
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 13:11:35 GMT 2023
    - 268 bytes
    - Viewed (0)
Back to top