Wednesday, September 21, 2022
Show HN: Hurl, test APIs with plain text and libcurl https://ift.tt/TzYC1lG
Show HN: Hurl, test APIs with plain text and libcurl Hi, We're happy to release a new version of Hurl [1]. Hurl is a command line tool powered by curl, that runs HTTP requests defined in a simple plain text format: # Get home: GET https://example.org HTTP/1.1 200 [Captures] csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)" # Do login! POST https://ift.tt/6SMuyD5 X-CSRF-TOKEN: HTTP/1.1 302 Hurl can be used to get data like curl, or as an integration testing tool for JSON/XML HTTP apis / HTML content. Requests can be chained, and one can add asserts on response headers, cookies and body. For instance: GET https://ift.tt/HoSCsZA screencapability: low HTTP/1.1 200 [Asserts] jsonpath "$.validated" == true jsonpath "$.userInfo.lastName" == "Herbert" jsonpath "$.hasDevice" == false jsonpath "$.links" count == 12 jsonpath "$.order" matches /^order-\d{8}$/ You can see more samples in the documentation [2]. We've designed Hurl to be easily integrated in CI/CD (GitHub, GitLab), and its text format can be used as a documentation, commited in a repo etc... It's a single binary written in Rust, that is powered by libcurl under the hood, for a fast CLI tool for both devops and developers. In this new version, we've added the following improvements: - verbose output: add more color to Hurl --verbose output, and also added --very-verbose option to output request and response bodies - request options: command-line options such as --location (follow HTTP redirection), --verbose, --insecure etc... can now be applied to a particular request with an [Options] sections - and more, see here for a quick tout of 1.7.0 [3] [1] https://ift.tt/6ncbQp9 [2] https://ift.tt/uwrOSFg [3] https://ift.tt/YQLelE1 Previous Show HN < https://news.ycombinator.com/item?id=28758226 > and < https://news.ycombinator.com/item?id=25655737 > https://ift.tt/6ncbQp9 September 21, 2022 at 02:13PM
Subscribe to:
Post Comments (Atom)
Show HN: Infrabase – Prompt-Ops for AWS https://ift.tt/M8z7y4K
Show HN: Infrabase – Prompt-Ops for AWS We too at first thought that letting an LLM manage your AWS account must be a bad idea. What could p...
-
Show HN: High school robotics code/CAD/design binder release Hello HN! My name is Patrick, and I am a junior at my High School’s FRC robotic...
-
Show HN: D&D meets Siri – Interactive voice adventure Hey HN! I've been building tooling for voice-driven apps over the past few mon...
-
Show HN: I Made an AI Social Media Manager to Automate Content Creation Hey HN, I am a Solopreneur, and I love building apps to automate bor...
No comments:
Post a Comment