News for hackers. Stuff that matters.
Re:The time might come when we add some JSON specific comman... by jicea on Thursday January 20, 2022 @01:51PM (#30012962)
Shameless plug, we've built hurl [1] to add some syntactic sugar over curl, with plain text. For example, you can write a text file post.hurl:

    POST https://api.ctl.io/v2/authentication/login
    {
      "username": "YOUR.USERNAME",
      "password": "YOUR.PASSWORD"
    }
and it will send the same POST request with a json body:

   hurl post.hurl
You can add asserts on the response too:

    POST https://api.ctl.io/v2/authentication/login
    {
      "username": "YOUR.USERNAME",
      "password": "YOUR.PASSWORD"
    }
    HTTP/1.0 200
    [Asserts]
    jsonpath "$.status" == "LOGGED"
Under the hood, we use libcurl and a Rust binding. The HTTP engine is curl because curl is awesome!

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

Re:The time might come when we add some JSON specific comman... by e12e on Thursday January 20, 2022 @07:37PM (#30017606)
Hurl probably has many fine uses - but note that curl reads json from file just fine:

  curl -d @post.json http://example.com
Re:The time might come when we add some JSON specific comman... by na85 on Thursday January 20, 2022 @02:22PM (#30013420)
>hurl

Awesome name.

Re:The time might come when we add some JSON specific comman... by tinselcity on Thursday January 20, 2022 @05:51PM (#30016471)