-
Creates an instance with specific
URL
Declaration
Swift
public convenience init(with url: URL)
Parameters
url
The base URL to build future requests
Return Value
The new
Edge
instance. -
Creates an instance with a valid
URL
fromString
Declaration
Swift
public convenience init(with baseURL: String)
Parameters
baseURL
The base URL string to build future requests
Return Value
The new
Edge
instance.
-
Run all requests enqueue
Declaration
Swift
public func start()
-
Pause all requests enqueue
Declaration
Swift
public func stop()
-
Reset all plugins and requests
Declaration
Swift
public func reset()
-
Add an interceptor to queue
Declaration
Swift
public func add(interceptor: Interceptor)
-
Remove all interceptors from queue
Declaration
Swift
public func removePlugIns()
-
Declaration
Swift
public func request<T: Task>(_ task: T, completion: @escaping ((JSONResponse) -> Void))
Parameters
task
Task
request especificationcompletion
closure with
JSONResponse
result -
Execute request
Task
withString
as responseDeclaration
Swift
public func request<T: Task>(_ task: T, completion: @escaping ((PlainResponse) -> Void))
Parameters
task
Task
request especificationcompletion
closure with
PlainResponse
result -
Execute request
Task
withData?
as responseDeclaration
Swift
public func request<T: Task>(_ task: T, completion: @escaping ((DataResponse) -> Void))
Parameters
task
Task
request especificationcompletion
closure with
DataResponse
result -
Declaration
Swift
public func request<T: Task>(_ task: T, completion: @escaping ((ResponseHandler) -> Void))
Parameters
task
Task
request especificationcompletion
closure with
ResponseHandler
result