Closed
Description
All the generated APIs return RequestBuilder<T>
for further process. I'm wondering what is the motivation for this, which requires extra typing?
I'm wondering why the usage couldn't just be simple like the following (something equivalent to Obj-C version)?
CoffeeShopClientAPI.CoffeeShopAPI.coffeeShopCreate(data: coffeeShop) {
output, error in
// `output` holds the returned model as an instance of CoffeeShop
...
}
instead of:
CoffeeShopClientAPI.CoffeeShopAPI.coffeeShopCreate(data: coffeeShop).execute {
response, error in
let coffeeShop = response!.body
...
}
Could someone share thoughts on this? (@bajtos wanted to keep informed about this too)