EPINetworkingClient
public final class EPINetworkingClient
extension EPINetworkingClient: EPINetworkingClientProtocol
The networking client for EPINetworking.
-
Removes the authorization header.
Declaration
Swift
public func removeAuthorizationHeader()
-
Calls the API endpoint with the specified encoding, returning a publisher that emits a decodable value.
Declaration
Swift
func call<Value>( endpoint: APICall, parameterEncoding: ParameterEncoding = .json ) -> AnyPublisher<Value, NetworkError> where Value: Decodable
Parameters
endpoint
The API endpoint to be called.
parameterEncoding
The parameter encoding for the request. Default is
.json
.Return Value
A publisher that emits a decodable value.
-
Calls the API endpoint with the specified encoding, returning a publisher that emits a
Void
value.Declaration
Swift
func call( endpoint: APICall, parameterEncoding: ParameterEncoding = .json ) -> AnyPublisher<Void, NetworkError>
Parameters
endpoint
The API endpoint to be called.
parameterEncoding
The parameter encoding for the request. Default is
.json
.Return Value
A publisher that emits a
Void
value. -
Calls the API endpoint with no parameters, returning a publisher that emits a decodable value.
Declaration
Swift
func callAtUrl<Value>() -> AnyPublisher<Value, NetworkError> where Value : Decodable
Return Value
A publisher that emits a decodable value.
-
Calls the API endpoint with the specified parameters, returning a publisher that emits a decodable value.
Declaration
Swift
func callAtUrl<Value>(_ params: Encodable) -> AnyPublisher<Value, NetworkError> where Value : Decodable
Parameters
params
The parameters to be sent in the request.
Return Value
A publisher that emits a decodable value.
-
Calls the API endpoint with no parameters, returning a publisher that emits a
Void
value.Declaration
Swift
func callAtUrl() -> AnyPublisher<Void, NetworkError>
Return Value
A publisher that emits a
Void
value. -
Calls the API endpoint with the specified parameters, returning a publisher that emits a
Void
value.Declaration
Swift
func callAtUrl(_ params: Encodable) -> AnyPublisher<Void, NetworkError>
Parameters
params
The parameters to be sent in the request.
Return Value
A publisher that emits a
Void
value.