2021-12-09

Tech Programing

程式人小天地

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>>



Source link

資料來源:Stackoverflow

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *