Allow to add default environment for HTTP Client

When I am opening new HTTP client request, I would love to have already chosen default environment all the requests will be run with.
Obviously I can just click every time on: “Run with:”, but is kind of frustrating when I have to do it everytime, especially that I have to use mouse.

I was trying to find workaround, and e.g. have a shortcut for “Run with…”, but from what I find I can't assign one.

0
1 comment

Hi Jakub, sorry to hear this issue is frustrating. It’s not possible right now to set a global default environment for the HTTP Client in IntelliJ IDEA or to bind a shortcut directly to the “Run with…” selector. The environment is remembered per .http file only, so you have to choose it at least once for each file. I've created a feature request for your issue here IJPL-224345 (Allow setting a global or project level default environment for new HTTP Client requests), you can follow it for updates.

Please try these workarounds:

  • Keep a single requests.http (or a few shared files) per project, set the environment once, and add your requests there instead of creating new scratch files.
  • For frequently used requests, create HTTP Request run configurations (Run → Edit Configurations…) and assign shortcuts to those configurations; they remember the chosen environment.
0

Please sign in to leave a comment.