Compare commits
No commits in common. "f6c4d634ab026e400f038dd8bcd385d496f13bc2" and "085f60ab4fa29abae17ee11b88bcf0631150ab8f" have entirely different histories.
f6c4d634ab
...
085f60ab4f
@ -1,8 +1,5 @@
|
|||||||
ns std::core
|
ns std::core
|
||||||
|
|
||||||
pub int String {
|
pub int String
|
||||||
bytes: Array<Byte>
|
|
||||||
}
|
|
||||||
|
|
||||||
#[internal]
|
impl StringImpl(fld bytes: Array<Byte>) : String
|
||||||
impl StringImpl(bytes) : String
|
|
||||||
|
@ -13,16 +13,3 @@ fn main = jsonClient()
|
|||||||
map || ( it.body.accessToken )
|
map || ( it.body.accessToken )
|
||||||
fold println
|
fold println
|
||||||
()
|
()
|
||||||
|
|
||||||
# Better: main which returns IO (a Callable?) automatically calls the IO
|
|
||||||
# Also, JsonClient can "login" using various methods, such as a Bearer token
|
|
||||||
|
|
||||||
use std::http::{jsonClient, bearerToken}
|
|
||||||
|
|
||||||
fn main = jsonClient(
|
|
||||||
baseUrl: 'http:/localhost:1234',
|
|
||||||
auth: bearerToken || ( post('/login', username: 'test', password: 'test') map || ( it.body.accessToken ) )
|
|
||||||
)
|
|
||||||
get '/greeting'
|
|
||||||
map || ( it.body.greeting )
|
|
||||||
fold println
|
|
||||||
|
Loading…
Reference in New Issue
Block a user