Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

ParameterEncoding

mattt edited this page Sep 18, 2020 · 2 revisions

ParameterEncoding

A type used to define how a set of parameters are applied to a URLRequest.

public protocol ParameterEncoding

Requirements

encode(_:​with:​)

Creates a URLRequest by encoding parameters and applying them on the passed request.

func encode(_ urlRequest:​ URLRequestConvertible, with parameters:​ Parameters?) throws -> URLRequest

Parameters

  • urlRequest:​ URLRequestConvertible value onto which parameters will be encoded.
  • parameters:​ Parameters to encode onto the request.

Throws

Any Error produced during parameter encoding.

Returns

The encoded URLRequest.

Types
Protocols
Global Typealiases
Clone this wiki locally