Vapor Documentation Beta

Structure URLEncoded​Form​Encoder.​Configuration

public struct Configuration

Used to capture URLForm Coding Configuration used for encoding.

Member Of

URLEncodedFormEncoder

Encodes Encodable instances to application/x-www-form-urlencoded data.

Nested Types

URLEncodedFormEncoder.Configuration.ArrayEncoding

Supported array encodings.

URLEncodedFormEncoder.Configuration.DateEncodingStrategy

Supported date formats

Initializers

init(array​Encoding:​date​Encoding​Strategy:​)

public init(arrayEncoding: ArrayEncoding = .bracket, dateEncodingStrategy: DateEncodingStrategy = .secondsSince1970)

Creates a new Configuration.

Parameters

array​Encoding Array​Encoding

Specified array encoding. Defaults to .bracket.

date​Format

Format to encode date format too. Defaults to secondsSince1970

Properties

array​Encoding

var arrayEncoding: ArrayEncoding

Specified array encoding.

date​Encoding​Strategy

var dateEncodingStrategy: DateEncodingStrategy