hurl icon indicating copy to clipboard operation
hurl copied to clipboard

Add --curl option to hurl to get curl commad to reproduce a Hurl file

Open jcamiel opened this issue 1 year ago • 1 comments

Add --curl option to get the list of curl commands to reproduce a run.

When using --verbose, we already display a debug curl command. This option will list the curl command without being force to grep the standard error:

$ hurl --curl out.txt test.hurl

jcamiel avatar Apr 15 '24 14:04 jcamiel

As an workaround, you might use the flag --v, --verbose Turn on verbose which will output:

* Request can be run with the following curl command:
* curl ....

augustomelo avatar Sep 17 '24 07:09 augustomelo

@fabricereix @lepapareil --curl is available now, I've added two integrations tests tests_ok/assert_body_curl.sh and tests_ok/multilines_curl.sh. Don't know yet if we use the current integration tests or if we do dedicated tests with tests_curl/*. I like this simple first step, it fits in our current integration tests model, we can reuse existing Flask endpoints, we can add curl integration tests to tests_failed/*etc... To discuss !

jcamiel avatar Nov 07 '24 16:11 jcamiel