Zurl is a command-line tool written in Zig, designed to provide a simplified interface to perform HTTP requests, inspired by the functionality of curl. Zurl aims to offer additional features and ease of use, including the ability to save and replay requests, automatic management of authentication requests, and more.
Zurl uses libcurl under the hood to handle HTTP requests and responses and sqlite3 as storage to save the requests.
Zurl can be built using devbox to create a dev shell with all the necessary dependencies.
git clone git@github.com:iskyd/zurl.git
cd zurl
zig buildExecuting a GET request
zurl --method GET --header Content-type=application/json https://pokeapi.co/api/v2/pokemon/mewtwo | jq .statsZurl supports headers, query (query params) and json.
zurl --method GET --query key=value --header Content-type=application/json https://pokeapi.co/api/v2/pokemon/mewtwo | jq .stats
zurl --method POST --json '{"key": "value"}' --query key=value --header Content-type=application/json https://api.example.comInitialize the sqlite database to save the requests.
zurl --init --db zurl.dbSave the current request.
zurl --save pokemon/mewtwo --db zurl.db --method GET https://pokeapi.co/api/v2/pokemon/mewtwoExecute a saved request.
zurl --find pokemon/mewtwo --db zurl.dbList all the saved requests (support --filter)
zurl --db zurl.db --list
zurl --db zurl.db --list --filter pokemon%