mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-17 14:11:23 +01:00
cli: handle send/render http plugin host requests
This commit is contained in:
1 parent
3c12074db6
commit
fb5ad8c7f7
3 files changed
+212
-30
No files matched your search
@@ -317,7 +317,8 @@ async function getResponse(
|
||||
finalBehavior === 'always' ||
|
||||
(finalBehavior === BEHAVIOR_TTL && shouldSendExpired(response, ttl))
|
||||
) {
|
||||
// NOTE: Render inside this conditional, or we'll get infinite recursion (render->render->...)
|
||||
// Explicitly render the request before send (instead of relying on send() to render) so that we can
|
||||
// preserve the render purpose.
|
||||
const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose });
|
||||
response = await ctx.httpRequest.send({ httpRequest: renderedHttpRequest });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user