Dynamic Url with @Post request retrofit + hilt
I am trying with Hilt and Retrofit2 to create a Post request with a dynamic URL.
I am getting the error @Url cannot be used with @POST URL (parameter #1)
I need the query to be dynamic too
@POST("{id}")
suspend fun getConfiguration(
@Url url: String,
@Body configRequest: ConfigRequest,
@Query("id") id: String
): Config
the builder
@ExperimentalSerializationApi
@Provides
@Singleton
fun provideApi(@ApplicationContext context: Context): Api{
val contentType =...