News for hackers. Stuff that matters.

fabricereix

Yes you can.

    $ echo GET http://google.com | hurl
    <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
    <TITLE>301 Moved</TITLE></HEAD><BODY>
    <H1>301 Moved</H1>
    The document has moved
    <A HREF="http://www.google.com/">here</A>.
    </BODY></HTML>
This is not possible yet.

We have related issues: - https://github.com/Orange-OpenSource/hurl/issues/87 - https://github.com/Orange-OpenSource/hurl/issues/88

Running several Hurl files concurrently (and independently) is clear and we will probably add in the next few months.

Running requests concurrently in the same Hurl file will be more complicated. The Hurl language has to describe a clear semantic about it.

You don't need a Rust compiler as prebuilt binaries are available for your system. https://hurl.dev/docs/installation.html

Relating to the choice of Rust, we think that it is the best language for this type of command-line tool. Performant like C/C++, but way safer to develop. And using native existing libs such as libcurl is possible.

Yes, this is possible to chain a value from a response to the next request. The value is extracted and stored in a variable. This variable can be reused afterward.

    # Get home:
    GET https://example.net
    
    HTTP/1.1 200
    [Captures]
    csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
    
    # Do login!
    POST https://example.net/login?user=toto&password=1234
    X-CSRF-TOKEN: {{csrf_token}}
    
    HTTP/1.1 302
Re:Show HN: Hurl – Run and test HTTP requests on Wednesday January 06, 2021 @10:21AM (#25658472)
We are planning the possibility to stop between requests with an inspection mode. We would also love an ncurse interface, like mitmproxy.
Re:Show HN: Hurl – Run and test HTTP requests on Wednesday January 06, 2021 @10:02AM (#25658326)
We have the option to include a body from an external file, this is especially useful for large or binary payload.

  POST https://example.net
  file,data.bin;