[Bug]: Existing terminal documentation errors and existing terminal requiring manual start (Windows)
Has this been reported before?
- [X] I have checked for existing reports of this issue
Repro steps
Documentation here https://httptoolkit.com/docs/reference/intercept-page/: For existing terminal states:
This interceptor is not available on Windows, as it's difficult to find a command that will work reliably in the many different shells available (e.g. cmd, git bash, cygwin, powershell, hyper, WSL).
However this is not true, it works fine on Windows. Entering the following into a powershell window:
PS C:\Users\bengalih\Desktop> Invoke-Expression (Invoke-WebRequest http://localhost:8001/ps-setup).Content
HTTP Toolkit interception enabled
PS C:\Users\bengalih\Desktop> Start-Process -FilePath $myEXE
This will properly bind the $myEXE executable to the toolkit session and allow for interception.
However, the problem here is that one must manually click on the "Existing Terminal" button in the GUI before the command is allowed to succeed. This puts a hamper on being able to automate tasks.
Automatically starting this session on 8081, or providing a way to automate starting it (settings or via command line), would also solve this issue: https://github.com/httptoolkit/httptoolkit/issues/612
Since you could automate any CLI this way.
How often does this bug happen?
Every time
The desktop OS you're using
Windows 11
Details of other apps/devices
No response
Error screenshot
No response
Any other info?
No response
However this is not true, it works fine on Windows.
Good catch! This is out of date. I'm doing some website updates at the moment, and I'll make sure that gets included.
However, the problem here is that one must manually click on the "Existing Terminal" button in the GUI before the command is allowed to succeed. This puts a hamper on being able to automate tasks.
That's a separate question that's not related to windows. HTTP Toolkit is a GUI program that's not designed to be fully automated like this at all.
For many automation cases, if you don't want a UI at all, you might just want to build your own scripting against https://github.com/httptoolkit/mockttp/ (HTTP Toolkit's internal scriptable proxy) directly. Guide here: https://httptoolkit.com/blog/javascript-mitm-proxy-mockttp/
Does that work for you? If not can you explain what kind automation you're interested in building and how you'd like to use it? As much detail as possible would be very helpful.