2 ms·
It's just a different way of structuring. api = new Api('http://my.cool.api' http://my.cool.api') api.get('/it') api.post('/it') // connect = rootUrl => met
by k__ 11y ago
It's just a different way of structuring.
api = new Api('http://my.cool.api' http://my.cool.api')
api.get('/it')
api.post('/it')
// connect = rootUrl => method => endpoint
api = connect('http://my.cool.api' http://my.cool.api')
get = api('GET')
post = api('POST')
get('/it')
post('/it')