retrofit / retrofit2.http / Headers / <init>

<init>

Headers(vararg value: String)

Adds headers literally supplied in the value.


  @Headers("Cache-Control: max-age=640000")
  @GET("/")
  ...
 
  @Headers({
    "X-Foo: Bar",
    "X-Ping: Pong"
  })
  @GET("/")
  ...
  
Note: Headers do not overwrite each other. All headers with the same name will be included in the request.

See Also
HeaderHeaderMap