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
jsonEncoderThe encoder to use when encoding JSON request bodies.
queryParameterEncoderThe encoder to use when encoding query parameters.
multipartFormDataEncoderThe encoder to use when encoding multipart/form-data bodies.
contextPathA prefix to prepend to each request’s path.
headerProviderThe provider to use for adding headers.
pathVariableProviderThe provider to use for adding path variables.
Configuration Structure Reference