【问题标题】:Android REST API - Parse ServerAndroid REST API - 解析服务器
【发布时间】:2017-07-03 15:44:30
【问题描述】:

用Retrofit,rest api向Parse Server发送查询的方式是什么。

我发现了类似的东西: trying to retrieve one object based on conditions values using Android REST API

但我不明白如何在 android 中为我的同类查询配置它:

@GET("classes/Mentor")
Call<OneMentorResponse> getMentor(@Query("where") 
String where, @Header("X-Parse-Session-Token") String token);

【问题讨论】:

    标签: android parsing retrofit


    【解决方案1】:

    传递一个 HashMap 进行查询。

    HashMap<String,String> sendKey=new HashMap<>;
    sendKey.put("yourKey","yourValue");
    yourApiInterface.getMentor(new JSONObject(sendKeyValue).toString()).new CallBack<OneMentorResponse response>{}
    

    并实现响应和失败方法。 并以您的方式传递您的标题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-08
      相关资源
      最近更新 更多