Header

annotation class Header(value: String)

Add a header to a request

@ GET("comments")

suspend fun request( @ Header("Content-Type") name: String): List< Comment>

A request with request("Hello World") will have the header "Content-Type:Hello World"

See also

Constructors

Header
Link copied to clipboard
fun Header(value: String)

Properties

value
Link copied to clipboard
val value: String