Added the "parameters" property to the Endpoint public protocol.
This commit is contained in:
parent
6277f95661
commit
e5b511d226
@ -15,6 +15,11 @@ import Foundation
|
||||
/// This protocol defines an endpoint to be used in a remote call.
|
||||
public protocol Endpoint {
|
||||
|
||||
// MARK: Type aliases
|
||||
|
||||
typealias Parameters = [String : String?]
|
||||
typealias Headers = [String : String]
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// The scheme subcomponent for the endpoint.
|
||||
@ -29,11 +34,14 @@ public protocol Endpoint {
|
||||
/// The path subcomponent for the endpoint.
|
||||
var path: String { get }
|
||||
|
||||
/// The query parameter subcomponents for the endpoint.
|
||||
var parameters: Parameters { get }
|
||||
|
||||
/// The HTTP request method for the endpoint.
|
||||
var method: HTTPRequestMethod { get }
|
||||
|
||||
/// The HTTP header fields as a dictionary for the endpoint.
|
||||
var headers: [String: String] { get }
|
||||
var headers: Headers { get }
|
||||
|
||||
/// The message body as data for a request.
|
||||
var body: Data? { get }
|
||||
|
Loading…
x
Reference in New Issue
Block a user