Back to Alamofire

ArrayEncoding

docs/Classes/URLEncodedFormEncoder/ArrayEncoding.html

5.12.0909 B
Original Source

ArrayEncoding

public enum ArrayEncoding

Encoding to use for Array values.

`

                brackets
                `

An empty set of square brackets (“[]”) are appended to the key for every value. This is the default encoding.

Declaration

Swift

case brackets

`

                noBrackets
                `

No brackets are appended to the key and the key is encoded as is.

Declaration

Swift

case noBrackets

`

                indexInBrackets
                `

Brackets containing the item index are appended. This matches the jQuery and Node.js behavior.

Declaration

Swift

case indexInBrackets

`

                custom(_:)
                `

Provide a custom array key encoding with the given closure.

Declaration

Swift

case custom((_ key: String, _ index: Int) -> String)