POST使用
参数少用@Field。
@PUT("cloud-rbac/user/password")
@Headers({"Content-Type: application/json", "Content-SHA-256: true"})
Call<HttpBaseResult<String>> changePassword(@Field("oldPassword") String oldPassword, @Field("password") String password);
参数多用@Body,传递一个实体类。
@PUT("cloud-rbac/user/password")
@Headers({"Content-Type: application/json", "Content-SHA-256: true"})
Call<HttpBaseResult<String>> changePassword(@Body ChangePasswordRequestBean data);
参数多用@PartMap传递RequestBody。
@Multipart
@POST("ezview/vehicle/gather")
Call<HttpBaseResult<VehicleResponse>> uploadInfo(@PartMap Map<String, RequestBody> files);