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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -