Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL #3283

Open
2 tasks
jcampbell05 opened this issue Oct 4, 2024 · 2 comments
Open
2 tasks

REPL #3283

jcampbell05 opened this issue Oct 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jcampbell05
Copy link

Problem to solve

It can be very annoying to have to make a temp file just to use HURL, this is one area in which curl is better. Ideally we could have a REPL where we can type a request and then hit enter twice to make it send that request.

Proposal

When typing hurl --repl we get a CLI interface that lets you write out your hurl file similar to python's repl, after hitting enter twice hurl will treat this as a signal to say the file is done.

After the request completes the repl should load back in the last request's hurl file so it can be adjusted.

Additional context and resources

Tasks to complete

  • Introduce repl interface
  • Documentation
@jcampbell05 jcampbell05 added the enhancement New feature or request label Oct 4, 2024
@fabricereix
Copy link
Collaborator

Hi @jcampbell05,
you can already use Hurl without creating a file by using the standard input.

$ echo GET https://google.com | hurl
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="https://www.google.com/">here</A>.
</BODY></HTML>
$ cat <<END | hurl --very-verbose
POST http://example.com
{ "message": "hello" }
END

A REPL could indeed be a nice feature, but to be honest, far from being priorized.

@jcamiel
Copy link
Collaborator

jcamiel commented Oct 9, 2024

I also find a REPL very attractive (maybe better at our current --interactive option which I doubt is used a lot). The thing that I'm a little worried is that a REPL would add a very different path code. So if there is a strong momentum on this issue / needs, why not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants