HttpQuery

public struct HttpQuery
extension HttpQuery: ExpressibleByDictionaryLiteral
extension HttpQuery: Equatable
extension HttpQuery: Hashable

This entity represents a set of HTTP query parameters. Basically, it abstracts a simple mapping from keys (String) to values (String). As a result, an instance of this struct can also be created directly from a [String: Any] dictionary literal where all values are represented in the query parameters by calling String.init(describing:).

Initialization

  • Initializes a new set of HTTP query parameters.

    Declaration

    Swift

    public init(_ parameters: [String : Any] = [:])

    Parameters

    parameters

    The mapping from keys to values. The latter are mapped to String via the String.init(describing:) initializer.

Protocol Conformance

  • Declaration

    Swift

    public init(dictionaryLiteral elements: (String, Any)...)
  • Declaration

    Swift

    public static func == (lhs: HttpQuery, rhs: HttpQuery) -> Bool
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)

Operators

  • Combines the parameters of two queries into a single set of query parameters. Whenever a parameters occurs in both queries, the value of the second query is used.

    Declaration

    Swift

    public static func + (lhs: `Self`, rhs: `Self`) -> HttpQuery