mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-22 00:38:27 +02:00
Reduce plugin runtime memory
This commit is contained in:
@@ -30,9 +30,13 @@ var plugin = {
|
||||
label: "Copy as Curl",
|
||||
icon: "copy",
|
||||
async onSelect(ctx, args) {
|
||||
console.log("---------------------------", 0);
|
||||
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: "preview" });
|
||||
console.log("---------------------------", 1);
|
||||
const data = await convertToCurl(rendered_request);
|
||||
console.log("---------------------------", 2);
|
||||
await ctx.clipboard.copyText(data);
|
||||
console.log("---------------------------", 3);
|
||||
await ctx.toast.show({ message: "Curl copied to clipboard", icon: "copy", color: "success" });
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user