Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for generate_html_response (0.08 seconds)

  1. docs_src/custom_response/tutorial004_py310.py

    from fastapi import FastAPI
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    def generate_html_response():
        html_content = """
        <html>
            <head>
                <title>Some HTML in here</title>
            </head>
            <body>
                <h1>Look ma! HTML!</h1>
            </body>
        </html>
        """
        return HTMLResponse(content=html_content, status_code=200)
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 491 bytes
    - Click Count (0)
Back to Top