denandz / glorp

A CLI-based HTTP intercept and replay proxy
BSD 3-Clause "New" or "Revised" License
243 stars 14 forks source link

Automatically replay modified request upon saving #8

Closed lanjelot closed 2 years ago

lanjelot commented 3 years ago

In the Replay UI, when returning from ctrl-e, could we have the request automatically issued if anything was modified instead of having to switch focus to the Go button and hit Enter?

Even better, do a vertical split upon entering the editor with ctrl-e, the request on the left and the response on the right, then automatically re-issue the request upon saving it in the editor via :w and refresh the response on the right panel of the vertical split. The CLI http proxy https://github.com/tweksteen/burst used to do this back in the good old python2 days :)

lanjelot commented 3 years ago

See https://github.com/tweksteen/burst/blob/master/burst/http.py#L272

denandz commented 3 years ago

The vertical split idea would be awesome, though a little tricky. I think I'd need to find a way to nest an external editor inside the glorp ui, or implement a native editor, hmmm.

The switch focus to send the request is annoying though, agreed. As an interim I can implement a key-binding (ctrl-g) to fire the request, avoiding having to switch focus. I'll add the auto-send-if-modified as a toggleable feature in the replayer

denandz commented 3 years ago

ctrl-g to fire requests implemented by a83c0454a21543ce1d806c3a5708f66c44905549

denandz commented 2 years ago

Auto-firing requests has (finally) been added by commit 2cd18d2557af45a255aea3a2ac3ce8700d3c2288 along with support for using any external editor to edit the replay request. Toggle the auto-send using the checkbox:

Screenshot from 2021-12-02 22-22-09