Send purpose with render request

This commit is contained in:
Gregory Schier
2024-08-23 13:31:39 -07:00
parent 5ba11ca788
commit 7ca3b9bd20
20 changed files with 47 additions and 47 deletions

View File

@@ -8,7 +8,7 @@ export const plugin: Plugin = {
label: 'Copy as Curl',
icon: 'copy',
async onSelect(ctx, args) {
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest });
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: 'preview' });
const data = await pluginHookExport(ctx, rendered_request);
ctx.clipboard.copyText(data);
ctx.toast.show({ variant: 'copied', message: 'Curl copied to clipboard' });