Skip to content

Commit

Permalink
enable cloning requests
Browse files Browse the repository at this point in the history
  • Loading branch information
loudar committed Jul 24, 2024
1 parent 02437b1 commit dea7f03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ui/templates/layout.templates.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ export class LayoutTemplates {
await currentResponse.overwrite(null);
toast(`Request "${request.name}" opened`, null, "positive");
}),
GenericTemplates.buttonWithIcon("content_copy", "Clone", () => {
currentRequest.new({
url: request.url,
method: request.method,
headers: request.headers,
body: request.body,
name: request.name,
saved: false
});
}),
GenericTemplates.buttonWithIcon("delete", "Delete", () => {
Request.delete(request.id).then(() => {
Request.getSaved().then(reqs => {
Expand Down

0 comments on commit dea7f03

Please sign in to comment.