This message was deleted.
# ask-for-help
s
This message was deleted.
j
It's actually pretty easy: in your
predict_wsi
method, add a parameter called
ctx
, like:
Copy code
@svc.api(input=Multipart(image=WSIFile(), meta=JSON()), output=JSON())
def predict_wsi(image, meta:JSON, ctx: bentoml.Context): #
then you should be able to retrieve the headers with
Copy code
ctx.request.headers.get("x-my-header")
🙌 1
j
I knew there was a way. I had done something like this months ago but couldnt find the details on it. Thanks!
j
most welcome!