Azure 移动服务 invokeApi 的特定重载在调用自定义 API 时不起作用
Particular overload of Azure Mobile Service invokeApi is not working while calling custom API
用于 Android 的 Azure 移动服务客户端 SDK 的 invokeApi 函数的所有重载的 documentation/sample 在哪里?
我找到了 this 文章并尝试了以下代码,但它不起作用。没有编译时或 运行 时间错误,调用了 invokeApi,但它不会返回到 onSuccess 或 onFailure。如果我在没有订单对象的情况下调用 invokeApi,一切都会按预期进行
PizzaOrder order = new PizzaOrder();
order.Size = "Large";
order.Flavor = "Four cheeses";
order.UserPhone = "555-555-1234";
ListenableFuture<PizzaOrderResponse> testresult = mClient.invokeApi("bookservice", order, PizzaOrderResponse.class);
Futures.addCallback(testresult, new FutureCallback<PizzaOrderResponse>() {
@Override
public void onFailure(Throwable exc) {
// failure handling code here
}
@Override
public void onSuccess(PizzaOrderResponse testresult) {
// success handling code here
}
});
自定义 API 返回的数据对象中的一个属性的数据类型不正确。我仍然不确定好的文档在哪里以及为什么自定义 API 调用没有失败但至少它现在可以正常工作。
用于 Android 的 Azure 移动服务客户端 SDK 的 invokeApi 函数的所有重载的 documentation/sample 在哪里?
我找到了 this 文章并尝试了以下代码,但它不起作用。没有编译时或 运行 时间错误,调用了 invokeApi,但它不会返回到 onSuccess 或 onFailure。如果我在没有订单对象的情况下调用 invokeApi,一切都会按预期进行
PizzaOrder order = new PizzaOrder();
order.Size = "Large";
order.Flavor = "Four cheeses";
order.UserPhone = "555-555-1234";
ListenableFuture<PizzaOrderResponse> testresult = mClient.invokeApi("bookservice", order, PizzaOrderResponse.class);
Futures.addCallback(testresult, new FutureCallback<PizzaOrderResponse>() {
@Override
public void onFailure(Throwable exc) {
// failure handling code here
}
@Override
public void onSuccess(PizzaOrderResponse testresult) {
// success handling code here
}
});
自定义 API 返回的数据对象中的一个属性的数据类型不正确。我仍然不确定好的文档在哪里以及为什么自定义 API 调用没有失败但至少它现在可以正常工作。