I need to try to get the full URL Retrofit is using for make API calls.
For example:
@GET("recipes/hot/")
suspend fun doCall(): Recipes
I want to somehow get the full URL (base url + paths etc.) that this API call is doing.
One solution I've found was:
@GET("recipes/hot/")
suspend fun doCall(): Response<Recipes>
Then you can get the url
from this response wrapper class.
However, the rest of the api calls in the codebase doesn't wrap the return type with Response
, so I really want to avoid doing this.
Is there some easy way I can get the full URL from a Retrofit api call?