Preferences

antisceptic parent
Is that POST in the readme sending the password in the query params? Is this shorthand or literally adding them to the params?

I don't really feel the need for a curl replacement. In the past I've used httpie which is pretty slick but I end up falling back to writing tests in python using requests library.

Maybe I'm not the target audience here, but I should still say something nice I guess. It's nice that it's written in Rust, and open source tooling is in need of fresh projects ever since everyone started bunkering up against the AI monolith scraping all their work. We should celebrate this kind of project, I just wish I had a use for it.


jicea
The POST in the README is going to send the params in the request body "url form encoded" like a form in a web page. There are more samples on the doc site [1].

Regarding curl, Hurl is just adding some syntax to pass data from request to request and add assert to responses. For a one time send & forget request, curl is the way, but if you've a kind of workflow (like accessing an authentified resource) Hurl is worth a try. Hurl uses libcurl under the hood and you've an option `--curl` to get a list of curl commands.

[1]: https://hurl.dev/docs/samples.html

mrcarrot
> The POST in the README is going to send the params in the request body "url form encoded" like a form in a web page.

Is there a different POST request in the readme or are you saying that this example is going to send the "user" and "password" params in the request body?

> POST https://example.org/login?user=toto&password=1234

That seems really surprising to me - how would you then send a POST request that includes query string parameters? The documentation on form parameters [1] suggests there's an explicit syntax for sending form-encoded request parameters

[1]: https://hurl.dev/docs/request.html#form-parameters

jicea
Ah sorry for both, the README sample is here from the start (4 years) ago that I didn't take time to read it with a fresh eye:

  POST https://acmecorp.net/login?user=toto&password=1234
In the README is doing a POST request with user and paasword parameter in the URL.

  POST https://acmecorp.net/login
  [Form]
  user: toto
  password: 1234
Is a more traditional POST with user and password in the body. Probably going to update the READMEs sample Issue created here [1]!

[1]: https://github.com/Orange-OpenSource/hurl/issues/4151

ankitrgadiya
I see it more as a Postman replacement than curl. When I’m working on a set of APIs, I can quickly write a Hurl file with different combinations that I’m working on. There are usually editor integrations to run individual requests. Then I can share the same Hurl file to my team or commit it in the repo.
Check out tavern if you’re in python-land. Pretty pleasant way to write declarative API tests.

This item has no comments currently.