How to pass programatically generated req/res context to API controller functions? #9062
Answered
by
flippingflapping
flippingflapping
asked this question in
Q&A
|
I'd like to receive requests via a RabbitMQ message that is packaged into a HTTP request, response context object and ultimately passed to my loopback middleware controllers. I've gotten up to the stage of packaging the message into a HTTP request/response object and I would now like to know how to pass it on to the middleware controllers. I'm assuming I'd need to pass the context to the sequence's handle function, but unclear how to set that up. |
Answered by
flippingflapping
Nov 8, 2022
Replies: 1 comment
|
For posterity, I solved this via injecting the server to grab the sequence. Could have also grabbed the sequence directly via its binding key |
0 replies
Answer selected by
flippingflapping
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For posterity, I solved this via injecting the server to grab the sequence.
Could have also grabbed the sequence directly via its binding key
@inject(RestBindings.SEQUENCE) private sequence: MiddlewareSequence, but was seeing errors injecting it with my pa…