5 ms·
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:/
by jicea 5y ago
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 https://github.com/Orange-OpenSource/hurl
- na85 5y ago>hurl Awesome name.
- tinselcity 5y agoIt is a good name! https://github.com/EdgeCast/hurl https://github.com/EdgeCast/hurl
- deleted 5y ago[deleted]
- e12e 5y agoHurl probably has many fine uses - but note that curl reads json from file just fine: curl -d @post.json http://example.com