Configuration
public struct Configuration
The configuration settings for RestingRequestConverter
.
-
init(jsonEncoder:
queryParameterEncoder: multipartFormDataEncoder: contextPath: headerProvider: pathVariableProvider: ) Creates a new
Configuration
.When using header and path variable providers, the values added to individual requests overrides the one provided by providers.
Declaration
Swift
public init( jsonEncoder: JSONEncoder = JSONEncoder(), queryParameterEncoder: QueryParameterEncoder = QueryParameterEncoder(), multipartFormDataEncoder: MultipartFormDataEncoder = MultipartFormDataEncoder(), contextPath: String = "", headerProvider: HeaderProvider? = nil, pathVariableProvider: PathVariableProvider? = nil )
Parameters
jsonEncoder
The encoder to use when encoding JSON request bodies.
queryParameterEncoder
The encoder to use when encoding query parameters.
multipartFormDataEncoder
The encoder to use when encoding multipart/form-data bodies.
contextPath
A prefix to prepend to each request’s path.
headerProvider
The provider to use for adding headers.
pathVariableProvider
The provider to use for adding path variables.