Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghurtchu/scurla
:performing_arts: cURL-like HTTP Client backed by "sttp" and simple IO monad.
https://github.com/ghurtchu/scurla
csv functional-programming http-client io-monad json scala
Last synced: 4 days ago
JSON representation
:performing_arts: cURL-like HTTP Client backed by "sttp" and simple IO monad.
- Host: GitHub
- URL: https://github.com/ghurtchu/scurla
- Owner: Ghurtchu
- Created: 2022-04-27T10:57:58.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-10T16:26:41.000Z (about 2 years ago)
- Last Synced: 2023-12-08T00:08:52.782Z (11 months ago)
- Topics: csv, functional-programming, http-client, io-monad, json, scala
- Language: Scala
- Homepage:
- Size: 212 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scURLa
scURLa is a cURL-like HTTP Client backed by "sttp".Basic setup:
1) Clone the repository.
2) cd into ~/scURLa.
3) run `sbt` in order to start sbt server.
4) (Optional) run `test` to make sure that all unit tests pass.
5) 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:
GET request
----------------------------
> 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.
POST request
----------------------------
> run POST https://reqres.in/api/users json "{\"name\":\"morpheus\",\"job\":\"leader\"}" => posts json to the server> run POST http://somewebsite.com csv data.csv => posts csv to the server
PUT request
----------------------------
> run PUT https://reqres.in/api/users/{userId} '{\"name\":\"morpheus\",\"job\":\"leader\"}' => fully updates data filtered by primary idDELETE request
----------------------------
> run DELETE https://reqres.in/api/users/{userId} => deletes data filtered by primary idEnjoy!