mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-23 22:29:34 -05:00
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
19 lines
354 B
Python
19 lines
354 B
Python
from fastapi import FastAPI, Response
|
|
|
|
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>
|
|
"""
|
|
return Response(content=data, media_type="application/xml")
|