Add Retrofit @Query for value in the middle of link

Viewed 7

I have this link which contains different params , i want to search more through making a new request which will require passing id_ruta , i tried to pass it as params but not working , can anyone please help me , Thank you

  • This is the link
  https://www.samplesite.com/index.php/Ruta/get_pax_ruta?id_ruta=285774&key=5786938888

  • This is my code
 @GET("Ruta/get_pax_ruta?{id_ruta}&key=5786938888")
    suspend fun getRouteDetails(
        @Path("id_ruta") id_ruta : String
    ) : RouteDetailsModel

0 Answers
Related