URLQueryContainer
Helper for encoding and decoding data from an HTTP request query string.
protocol URLQueryContainer
Browse conforming typesSee query
for more information.
Helper for encoding and decoding data from an HTTP request query string.
protocol URLQueryContainer
See query
for more information.
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
var query: URLQueryContainer { get set }
func decode<D>(_ decodable: D.Type, using decoder: URLQueryDecoder) throws -> D where D : Decodable
mutating func encode<E>(_ encodable: E, using encoder: URLQueryEncoder) throws where E : Encodable
subscript<D>(path: CodingKeyRepresentable...) -> D? where D : Decodable { get }
Legacy alias for subscript(_:at:)-26w0c
.
subscript<D>(_: D.Type = D.self, at path: [CodingKeyRepresentable]) -> D? where D : Decodable { get }
Fetch a single Decodable
value at the supplied keypath in the container.
subscript<D>(_: D.Type = D.self, at path: CodingKeyRepresentable...) -> D? where D : Decodable { get }
Fetch a single Decodable
value at the supplied keypath in the container.
func decode<C>(_ content: C.Type) throws -> C where C : Content
Parse a Content
object from the container.
func decode<D>(_: D.Type) throws -> D where D : Decodable
Parse a Decodable
value from the container.
mutating func encode<C>(_ content: C) throws where C : Content
Serialize a Content
object to the container.
mutating func encode<E>(_ encodable: E) throws where E : Encodable
Serialize an Encodable
value to the container.
mutating func encode<C>(_ content: inout C) throws where C : Content
Serialize a Content
object to the container without copying it.
func get<D>(_: D.Type = D.self, at path: [CodingKeyRepresentable]) throws -> D where D : Decodable
Fetch a single Decodable
value at the supplied keypath in this container.
func get<D>(_: D.Type = D.self, at path: CodingKeyRepresentable...) throws -> D where D : Decodable
Fetch a single Decodable
value at the supplied keypath in the container.