mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-27 18:52:38 +01:00
Send purpose with render request
This commit is contained in:
1 parent
5ba11ca788
commit
7ca3b9bd20
20 files changed
+47
-47
No files matched your search
@@ -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' });
|
||||
|
||||
Reference in new issue
Block a user