Retrofit error-Missing either @GET URL or @Url parameter

前端 未结 1 1815
醉梦人生
醉梦人生 2020-12-28 11:56

I am working on Youtube API. The base URL is

Request :GET

https://www.googleapis.c         


        
相关标签:
1条回答
  • 2020-12-28 12:30

    It's much more semantically correct to use https://www.googleapis.com/youtube/v3/ as your base URL and then declare @GET("search/") on your service method.

    That said, if you really want your base URL to be the full path you can use @GET(".") to declare that your final URL is the same as your base URL.

    0 讨论(0)
提交回复
热议问题