@Documented
@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Headers
value
.
@Headers("Cache-Control: max-age=640000")
@GET("/")
...
@Headers({
"X-Foo: Bar",
"X-Ping: Pong"
})
@GET("/")
...
Parameter keys and values only allows ascii values by default. Specify allowUnsafeNonAsciiValues=true
to change this behavior.
@Headers({ "X-Foo: Bar", "X-Ping: Pong" }, allowUnsafeNonAsciiValues=true) @GET("/")
Note: Headers do not overwrite each other. All headers with the same name will be included in the request.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String[] |
value
The query parameter name.
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
allowUnsafeNonAsciiValues
Specifies whether the parameter name and value are already URL encoded.
|
public abstract boolean allowUnsafeNonAsciiValues