Convert hurl script to curl command #2615
-
Hey there, hurl it's amazing! I have a couple of scripts, and it happened that I needed to run commands on a remote machine where hurl is not present. Test/asserts are not necessary, jsut quick way to translate a script with command or chains would be really cool for an old lazy bum like me 🙃 I hope this is not a RTFM issue, I swear I've checked! :P |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
😆if it's in the docs, it's well buried! You can go from curl to Hurl with |
Beta Was this translation helpful? Give feedback.
-
A slightly OT follow up question: I guess is not available since it is not available in curl as well, is it possible to do a sort of dry run or preview of command before executing it? I think this is kinda related to current thread since, if I have to run the command in verbose mode to obtain the curl command, maybe it is not appropriate to execute again that command for whatever reason. Thank you again for your answer! |
Beta Was this translation helpful? Give feedback.
😆if it's in the docs, it's well buried!
You can go from curl to Hurl with
hurlfmt
. To go the other way, you can run your Hurl file with--verbose
option and grep the output to see each request's curl equivalent command. Dynamic values (variables/captures) are resolved so you should be able to replay your Hurl file.