How can I use path in a retorfit url?
1 min read
I’m trying to make the following request but I keep getting an error like the path can’t use it in the url. How can I pass correctly the path?
Request
@GET
fun getCelebrityVideos(
@Url url : String = "https://virtserver.swaggerhub.com/GAMING/1.0.1/celebrity/{celebrityId}/resources",
@Path("celebrityId") celebrityId : String? = null
): Single<List<DtoCelebrityResource>>
資料來源:Stackoverflow