i am using retrofit and okhttp to do network reuqu...
# squarelibraries
b
i am using retrofit and okhttp to do network reuquests. is there a possibility to add a field from a header to my parsed object? e.g.
Copy code
class HttpObjec(foo: Foo, date: Date) // date is the current date from the header of the response

interface HttpApi {
   @GET(url)
   fun doRequest(): HttpObject
}
I don´t want to add a Response object to every function in my interface like
Copy code
interface HttpApi {
   @GET(url)
   fun doRequest(): Response<HttpObject>
}
Maybe there are solutions with writing custom adapter or converter, but i did not found a proper one 😞