From 807eb358cebc7d6451132cfea47f7dd52337deee Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 19 Nov 2023 16:22:59 +0100 Subject: [PATCH] feat: hoppscotch appears but it's not ready --- .vscode/settings.json | 1 + knowledge base/hoppscotch.placeholder | 17 +++++++++++++++++ knowledge base/insomnia.md | 4 ++++ knowledge base/javascript.placeholder | 11 +++++++++++ knowledge base/postman.md | 6 +++++- 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 knowledge base/hoppscotch.placeholder create mode 100644 knowledge base/javascript.placeholder diff --git a/.vscode/settings.json b/.vscode/settings.json index daab807..e242ab7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,6 +63,7 @@ "hadolint", "hdparm", "helmfile", + "hoppscotch", "imager", "istio", "istioctl", diff --git a/knowledge base/hoppscotch.placeholder b/knowledge base/hoppscotch.placeholder new file mode 100644 index 0000000..0f323d6 --- /dev/null +++ b/knowledge base/hoppscotch.placeholder @@ -0,0 +1,17 @@ +```sh +brew install --cask 'hoppscotch' +``` + +Access the variables in the request section by referencing the variable in the format `<>`. + +post-request scripts == tests + +Set environment variables to use with a next request: + +```js +const jsonData = pw.response.body; // Save the JSON payload response +pw.env.set("accessToken", jsonData.access_token); // Set "accessToken" to the value of "access_token" in the response +pw.env.set("idToken", jsonData.id_token); // Set "idToken" to the value of "id_token" in the response +``` + +https://docs.hoppscotch.io/ diff --git a/knowledge base/insomnia.md b/knowledge base/insomnia.md index fd5e619..af710a0 100644 --- a/knowledge base/insomnia.md +++ b/knowledge base/insomnia.md @@ -24,6 +24,8 @@ - [Documentation] - [Inso CLI], runner for Insomnia - [Postman], an alternative to Insomnia +- [Hoppscotch], an alternative to Insomnia +- [Bruno], an alternative to Insomnia ## Sources @@ -44,6 +46,8 @@ All the references in the [further readings] section, plus the following: [further readings]: #further-readings +[bruno]: bruno.md +[hoppscotch]: hoppscotch.md [postman]: postman.md diff --git a/knowledge base/javascript.placeholder b/knowledge base/javascript.placeholder new file mode 100644 index 0000000..f91e4a4 --- /dev/null +++ b/knowledge base/javascript.placeholder @@ -0,0 +1,11 @@ +```js +let now = new Date() + +let oneYearFromNow = new Date() +oneYearFromNow.setDate(oneYearFromNow.getDate() + 365) + +console.log(now.toISOString()) +console.log(oneYearFromNow.toISOString()) +``` + +https://playcode.io/empty_javascript diff --git a/knowledge base/postman.md b/knowledge base/postman.md index ac3a056..060ee40 100644 --- a/knowledge base/postman.md +++ b/knowledge base/postman.md @@ -66,8 +66,10 @@ More examples [here][scripting in postman]. - [Website] - [Documentation] -- [Insomnia], an alternative to Postman - [Newman], CLI Collection runner for Postman +- [Insomnia], an alternative to Postman +- [Hoppscotch], an alternative to Postman +- [Bruno], an alternative to Postman ## Sources @@ -87,5 +89,7 @@ All the references in the [further readings] section, plus the following: [website]: https://www.postman.com/ +[bruno]: bruno.md +[hoppscotch]: hoppscotch.md [insomnia]: insomnia.md [newman]: newman.md