Reputation: 31
Hi friends need help in the retrofit i am beginner in the using retrofit please help me out i need the url to be like this
http://54.202.3.127/parallel_space/paralleljson.php?action=aboutus&id=1
if i set the using
**@GET("paralleljson.php?action={terms}")
Call<Terms_UserGuide_About> termsuserguide(@Path("terms") String terms,@Query("id")String id);**
its giving me this error
URL query string "action={terms}/" must not have replace block. For dynamic query parameters use @Query.
if i replace path with query then the url is changing like this
@GET("paralleljson.php?action=")
Call<Terms_UserGuide_About> termsuserguide(@Query("terms") String terms,@Query("id")String id);
http://54.202.3.127/parallel_space/paralleljson.php?action=&terms=aboutus&id=1
Upvotes: 1
Views: 305
Reputation: 4362
@GET("paralleljson.php")
Call<Terms_UserGuide_About> termsuserguide(@Query("action") String terms,@Query("id")String id);
it should work.
Upvotes: 2