scURLa is a cURL-like HTTP Client backed by "sttp".
Basic setup:
- Clone the repository.
- cd into ~/scURLa.
- run
sbt
in order to start sbt server. - (Optional) run
test
to make sure that all unit tests pass. - stay in the running
sbt
mode in order to make requests.
Below are the usage examples provided as commands which must be executed inside the sbt shell:
run GET https://reqres.in.api/users => returns the available users
run GET https://reqres.in.api/users -o {user_dir}/data.json => saves the result in the data.json file, otherwise saves in {user_dir}/data.txt by default, if path is not specified.
run POST https://reqres.in/api/users json "{"name":"morpheus","job":"leader"}" => posts json to the server
run POST https://somewebsite.com csv data.csv => posts csv to the server
run PUT https://reqres.in/api/users/{userId} '{"name":"morpheus","job":"leader"}' => fully updates data filtered by primary id
run DELETE https://reqres.in/api/users/{userId} => deletes data filtered by primary id
Enjoy!