简体   繁体   中英

Retrofit 2 Query, get back response?

How could i access with the correct syntax: api/kiosk/search/staff?companyID={companyID}&locationID={locationID}&name={name}

Right now i do this:

@GET("api/kiosk/search/staff?companyID={companyID}&locationID={locationID}&name={name}")
Call<Staff[]> staffItems(@Path("companyID") String companyID,@Query("locationId") String locationId, @Query("name") String name, @Header("Authorization")String auth);

Try this

@GET("api/kiosk/search/staff")
Call<Staff[]> staffItems(@Query("companyID") String companyID,@Query("locationId") String locationId, @Query("name") String 
name, @Header("Authorization")String auth);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM