diff --git a/sketching/curl.dms b/sketching/curl.dms new file mode 100644 index 0000000..1b0519b --- /dev/null +++ b/sketching/curl.dms @@ -0,0 +1,15 @@ +use std::http::jsonClient + +fn main = jsonClient() # json client + post 'http://localhost:1234/login', username: 'test', password: 'test' # Either + -> || ( it.body.accessToken ) # Either + |> println # IO + () + +# Without operators + +fn main = jsonClient() + post 'http://localhost:1234/login', username: 'test', password: 'test' + map || ( it.body.accessToken ) + fold println + ()