LoginRegisterApi.java
961 Bytes
package com.shunzhi.parent.api;
import com.google.gson.JsonObject;
import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
/**
* Created by Administrator on 2018/3/7 0007.
*/
public interface LoginRegisterApi {
String url="http://campus.myjxt.com/";
@FormUrlEncoded
@POST("Token")
Observable<JsonObject> loginResult(
@Field("grant_type") String grant_type, @Field("username") String username
, @Field("password") String password);
@FormUrlEncoded
@POST("api/Account/CurrentInfo")
Observable<JsonObject> registerResult(
@Field("grant_type") String grant_type, @Field("username") String username
, @Field("idcode") String idCode,@Field("password") String password);
@FormUrlEncoded
@POST("api/Account/CurrentInfo")
Observable<JsonObject> getUserInfo(@Field("grant_type") String grant_type);
}