Retrofit 2 Query, get back response?

Stoffe1985 Source

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);
javaandroidretrofit2

Answers

answered 3 months ago Navneet Krishna #1

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);

comments powered by Disqus