I have a web service link which I want to hit with different customerId in the form of
http://apidev.myserver.com.au:8980/TestService/rest/TestService/jobs/bycustid/customerId
how do I append the value of customerId?
this is my base URL :
http://apidev.myserver.com.au:8980/TestService/rest/TestService/
this is what my interface for calls look like :
interface CustomerJobs {
@GET("jobs/bycustid/11726")
Call<CustomerJobsPojo> getCustomerJobs();
}
As the doc says :
interface CustomerJobs {
@GET("jobs/bycustid/{id}")
Call<CustomerJobsPojo> getCustomerJobs(@Path("id") int id);
}
Try @Path annotation
interface CustomerJobs {
@GET("jobs/bycustid/{id}")
Call<CustomerJobsPojo> getCustomerJobs(@Path("id") String id);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With