trwnh.com/f3l/app/test/test.py

23 lines
911 B
Python
Raw Normal View History

from fastapi import Response, status
from ..server import app
@app.get("/resource1")
async def test_resource() -> Response:
response = Response(status_code=status.HTTP_200_OK)
response.headers.append('Link', '<https://inbox.example>; rel="http://www.w3.org/ns/ldp#inbox"')
return response
@app.get("/resource2")
async def test_resource2() -> Response:
response = Response(status_code=status.HTTP_200_OK)
response.headers.append('Link', '<https://inbox.example>; rel="http://www.w3.org/ns/ldp#inbox"')
response.headers.append('Link', '<https://inbox.example>; rel="unrelated"')
return response
@app.get("/resource3")
async def test_resource2() -> Response:
response = Response(status_code=status.HTTP_200_OK)
response.headers.append('Link', '<https://inbox.example>; rel="http://www.w3.org/ns/ldp#inbox"')
response.headers.append('Link', '<https://inbox.example>; rel="unrelated"')
return response