package com.phl.rxjavademo.bean;

import com.phl.rxjavademo.utils.Constant;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.Url;

/**
 * @name penghuanliang
 * @class describe 登录模块接口
 */

public interface LoginApi {

    @FormUrlEncoded
    @POST(Constant.URL_LOGIN)
    Observable<ResponseBody> login(@FieldMap Map<String, String> map);


    @FormUrlEncoded
    Observable<ResponseBody> getToken(@Url String url, @FieldMap Map<String, String> map);

    @FormUrlEncoded
    Observable<ResponseBody> getUserInfo(@Url String url, @FieldMap Map<String, String> map);

    //文件上传
    @POST
    Observable<ResponseBody> uploadFile(@Url String url, @Body MultipartBody multipartBody);


}