You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried this as well as replacing T in return type with List[T] but to no avail:
def fetch[T](endpoint: String): Future[List[T]] = {
val request = someClient.get(endpoint).accept("application/json")
request.send[List[T]]
}
Error:(30, 17) In order to decode a request to T, it must be known that a decoder exists to T from
all the content types that you Accept, which is currently String("application/json") :+: shapeless.CNil.
You may have forgotten to specify Accept types with the `accept(..)` method,
or you may be missing Decoder instances for some content types.
request.send[T]
Is there any solution or should I just keep my boilerplate code?
The text was updated successfully, but these errors were encountered:
I'm trying to get rid of boilerplate methods like this one:
Tried this as well as replacing
T
in return type withList[T]
but to no avail:Is there any solution or should I just keep my boilerplate code?
The text was updated successfully, but these errors were encountered: