DEV Community

Discussion on: Launching Hoppscotch v1.0 👽 - free, fast & beautiful API request builder 🎉

Collapse
 
liyasthomas profile image
Liyas Thomas • Edited

Pre-request scripts and Environment variables are deployed to production but experimental!
Full list of feature are here: github.com/liyasthomas/postwoman

Usage:

  1. Open Pre-request scripts by clicking the "<>" icon button under request Method

  2. Set env variables with JavaScript notation: pw.environment.set("key", "value"); inside pre-request script textarea.

Ex: pw.environment.set("route", "/api/users");

  1. Use <<key>> (including double angle brackets) anywhere inside request section as an env var

Ex: <<route>> inside Path field

Screenshots:

1

2

Other use cases are:

  • Including the timestamp in the request headers
  • Sending a random alphanumeric string in the URL parameters
  • You can even chain requests in near future 🔥

Full information can be found here: github.com/liyasthomas/postwoman/p...

Collapse
 
seveneye profile image
seveneye

cool. thanks for your work!

I'm thinking of something like environment in postman where you can easily change variables without modifying the request.

Thread Thread
 
liyasthomas profile image
Liyas Thomas

Actually this is cooking up! and will be deployed soon.
github.com/liyasthomas/postwoman/i...

Thread Thread
 
seveneye profile image
seveneye

wow. will be looking forward to this feature. You're awesome! :)

Thread Thread
 
liyasthomas profile image
Liyas Thomas

Glad you liked it! Star the project on GitHub, share among your friends/teams 🙏👽🛸✨