add server glue for reverse API call

This commit is contained in:
Sarah Hoffmann
2023-03-25 17:04:02 +01:00
parent 35b52c4656
commit 300921a93e
4 changed files with 143 additions and 17 deletions

View File

@@ -39,7 +39,8 @@ class ParamWrapper(api_impl.ASGIAdaptor):
def error(self, msg: str, status: int = 400) -> HTTPException:
return HTTPException(status, detail=msg)
return HTTPException(status, detail=msg,
headers={'content-type': self.content_type})
def create_response(self, status: int, output: str) -> Response: