Headers

annotation class Headers(val values: String)

Deprecated (with error)

In KtorGen vararg header with format 'name: value' is not valid, refactor is needed

Replace with

io.github.kingg22.ktorgen.http.Header

This is only for easy migration from other libraries, using this doesn't generate code

From

@Headers("Content-Type: application/json", "Accept: application/json")

to

@Header(Header.ContentType, Header.ContentTypes.Application.Json)//type-safe
@Header("Accept", "application/json)

See also

Properties

Link copied to clipboard
val values: Array<out String>