Skip to content

How to send a plain text response? #210

Closed Answered by JosephKiranBabu
JosephKiranBabu asked this question in Q&A
Discussion options

You must be logged in to vote

Found the answer in FastAPI documentation.

@rt('/quine/{name}')
def options(name: str):
    return Response("dav: 1", media_type="text/plain")

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JosephKiranBabu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant