package hurl

All checked builds pass
  1. Overview
  2. Docs
Hurl, a simple command-line HTTP client

Install

dune-project
 Dependency

Authors

Maintainers

Sources

hurl-0.0.1.beta3.tbz
sha256=824edaacf0e8dd91fd4efb5f151b6af11999f706108c62c1c92856dc5756f194
sha512=2bb31d861caef4697837e517d34377719be40ea538fcfad72b615dfba70630b6c14c3bd9c3ccc49556af96b29b3be4f7f2f263320cd3f362f5c5514cb2ba5a72

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.git

The 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)

  1. bstr >= "0.0.2"
  2. decompress >= "1.6.0"
  3. jsonm
  4. cmdliner >= "1.3.0"
  5. multipart_form >= "0.6.0"
  6. hxd >= "0.3.4"
  7. mirage-crypto-rng >= "1.2.0"
  8. httpcats >= "0.3.0"
  9. dune >= "2.8.0"
  10. ocaml >= "5.1.0"

Dev Dependencies

None

Optional Dependencies

None

Used by (1)

  1. vif

Conflicts (1)

  1. result < "1.5"

Build status

Results of building hurl with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. 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.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.0.1~beta3 (this version) n/a n/a good good good
  • 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