Yet another Rest API Client, but with a simple CLI and a GTK interface.
don't take it too serious, it's just a hobby project.
Run:
sonata new project <name>
Run (interactive mode):
sonata new request
To add variables, use the syntax of Go templates, such as:
http://localhost:1234/users/{{ .id }}
You can use this syntax for the URL, Headers and Body.
see the Template Functions section too
Run:
sonata run <name>
To set a variable, pass the flag -v name=value
.
To load a .env, pass the flag -e <name.env>
Some of the functions that you can use for the request template, are:
randomUUID
: for a random uuidqueryEscape
: for escaping query paramspathEscape
: for escaping path paramsenv
: for loading a env var
You can use them like so:
{
"id": "{{ randomUUID }}",
"password": "{{ env "PASSWORD" }}",
}
This project is licensed under the MIT license.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: