Support for OAuth 2.0 (#5)

This commit is contained in:
Gregory Schier
2025-01-26 13:32:17 -08:00
committed by GitHub
parent d142966d0c
commit 252d23bb0e
17 changed files with 855 additions and 52 deletions

View File

@@ -4,14 +4,13 @@ const NEWLINE = '\\\n ';
export const plugin: PluginDefinition = {
httpRequestActions: [{
key: 'export-curl',
label: 'Copy as Curl',
icon: 'copy',
async onSelect(ctx, args) {
const rendered_request = await ctx.httpRequest.render({ httpRequest: args.httpRequest, purpose: 'preview' });
const data = await convertToCurl(rendered_request);
ctx.clipboard.copyText(data);
ctx.toast.show({ message: 'Curl copied to clipboard', icon: 'copy' });
await ctx.clipboard.copyText(data);
await ctx.toast.show({ message: 'Curl copied to clipboard', icon: 'copy', color: 'success' });
},
}],
};