android - Error in retrofit GET request -
i using retrofit api calling in android app. in 1 of request url of request this:
/v1/employee/1?employeeid=50124
my retrofit method is:
@get("/v1/xyz/{employeeid}?companyid={companyid}") void getemployee(@path("employeeid")int employeeid, @path("companyid") int companyid, callback<list<model>> callback);
but when call api throws error, please how append url in retrofit request.
for dynamic query parameters use @query.
try using below code:
@get("/v1/xyz/{employeeid}") void getemployee(@path("employeeid")int employeeid, @query("companyid") int companyid, callback<list<model>> callback);
Comments
Post a Comment