我在使用改型作为我的web通信接口时遇到了一些问题,因为我的web通信接口包含在一个worpress网站中的php webservice上--当我在WP站点中调用一个JSON API方法时,我在我的android客户机上得到了一个SSL异常,即使我运行的是http而不是https。
这是我的密码-
public class RestApi {
private static final String API_URL = "https://tmc.co.nf/api";
private SmokeTalkRest service;
interface Smo
让我们想象一下,我有一个带有端点/api/status的REST。访问此端点时,API将向消息队列发送消息,请求其他服务的状态。
然后,作为答复,服务向REST侦听的队列发送一条带有其状态的消息。因此,它是单消息请求状态和单回复消息。
我的问题是:是否有一种设计模式来将这种方法的异步特性转换为API中的同步模式?换句话说:下面的伪代码中的GetStatus(...)方法是否可以实现一种模式,以便通过多个消息队列甚至是pub/子系统上的通信来同步获取状态。
var statusRequestMsg = "get_status";
var statusResponseMsg = G
最初,我在C#中使用了一个REST请求,并取消了JSON响应。我想使用多个API(2或3)。如何修改我的代码呢?
static void Main(string[] args)
{
api1();
}
public static void api1()
{
var client = new RestClient("https://dummy.restapiexample.com/api/");
var request = new RestRequest("Data");
var response = client.Execute
用户成功登录后,将有另一个api调用来获取用户信息。但在响应之前,我将关闭活动并启动家庭活动。
public void onResponse(Call<LoginResponse> call, Response<LoginResponse> response) {
//save token
// call REST service to get user info and update the user records on DB.
// update the notification token info
//go to home