I use Retrofit and Robospice to make API calls in my Android app. All @POST methods work just fine, like @GET commands with no parameters in the URL, but I can't get any @GET calls to work with parameters at the end!
For example, if my API path was "my / api / call /" and I wanted the URL to have 2 parameters "param1" and "param2", the get call would look like this:
http://www.example.com/my/api/call?param1=value1¶m2=value2
so I configured my @GET interface like this:
@GET("/my/api/call?param1={p1}¶m2={p2}") Response getMyThing(@Path("p1") String param1, @Path("p2") String param2);
but i get an error
"An exception occurred while executing a network request: the URL request line" /my/api/call?param1={p1}¶m2={p2} "for the getMyThing method may not have replaced the block."
What am I doing wrong?
android api get retrofit robospice
AndroidNoob Nov 14 '13 at 10:19 2013-11-14 10:19
source share