package hurl
Build not checkedInstall
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8ffb4d128cb0c471a1079f88ca9750ba88d73a27572fcb86d9cb4c2324ee90ed
sha512=333dda92f47db307cd038ad196abd795c93e3998fad9589e38bd6af1cc1e63fb0b0cede5a47340b9cca08291622798c7365d1ea21292773fca3f86754c436cf2
Description
Added to opam-repository:
README
Hurl, a simple command-line HTTP client
Hurl is a simple tool used to make HTTP requests (http/1.1 and h2) while introspecting different information such as the chosen IP of the server, the TLS configuration chosen between the server and the client as well as the fields given by the server. It is possible to build a request to submit information via json or in the form of a 'multipart-form'. It allows several types of display and inflates content if gzip or zlib is used. You can perform a hexdump, normalise the json received or simply display the content as it is. The aim is to propose a tool that can be used to debug and interact with an HTTP server by displaying all the essential information from all the protocols involved in the communication.
Let's start by installing the software:
$ opam pin add https://github.com/robur-coop/hurl.gitThe hurl software is now installed on your opam and ready to use:
$ hurl https://robur.coop
HTTP/1.1 200 OK
content-type: text/html; charset=utf-8
etag: ----------------------------------------
content-length: 1500
...You can change the way the content of the response is displayed. You can 'hexdump' the content or (if the server informs you that it is json content) normalise the content to json format:
$ hurl http://pie.dev/get
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 444
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
{
"args": {},
"headers": {
"Accept-Encoding": "gzip",
"Connection": "Keep-Alive",
"Content-Length": "0",
"Host": "pie.dev",
"User-Agent": "hurl/test"
},
"origin": "x.x.x.x",
"url": "http://pie.dev/get"
}Information such as DNS (the chosen IP address) and TLS can also be displayed:
$ hurl https://robur.coop/ --print=dshb
A robur.coop:
193.30.40.138
TLS 1.3 with AEAD AES128 GCM
content-type: text/html; charset=utf-8
etag: ----------------------------------------
content-length: 1500
...There are a whole host of options available:
- use our OCaml implementation for DNS resolution instead of using your system's resolver
- change the http protocol used
- specify a certain version of tls
- specify a resolver like the one at uncensoreddns.org
- accept certain certificates (such as self-signed ones)
- modify the header sent to the server
- add parameters to the URL
- submit files (via multipart)
- submit json content
To do this, we advise you to use the --help option, which describes all these options.
Examples and tests
If you are interested in such a tool, you can view the tests and use our hurl.srv server to test the tool.
Dependencies (10)
-
bstr
>= "0.0.2" -
decompress
>= "1.5.3" & < "1.6.0" - jsonm
-
cmdliner
>= "1.3.0" -
multipart_form
>= "0.6.0" -
hxd
>= "0.3.4" - mirage-crypto-rng-miou-unix
-
httpcats
>= "0.1.0" & < "0.3.0" -
dune
>= "2.8.0" -
ocaml
>= "5.1.0"
Dev Dependencies (1)
-
cmdliner
with-test & < "2.0.0"
Optional Dependencies
None
Used by (1)
-
vif
< "0.0.1~beta3"
Conflicts (1)
-
result
< "1.5"
Build status
Results of building hurl with each compiler on check.ci.ocaml.org, run of against opam-repository 8d8d144. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
This version is not in the latest run; the versions below are.
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure