The tutorial describes updating APIManagerProtocol
with a requestToken()
function and then implementing the function in the APIManager
class. However, the implementation calls its own perform(request:authToken:)
function passing the AuthTokenRequest
enum as the only argument. Unsurprisingly, the compiler balks. (Please see attached screenshot)
What am I missing?
UPDATE
Ok, I see my mistake. I implemented the APIManagerProtocol
perform(_ request: RequestProtocol, authToken: String)
function without the default value, i.e.,
perform(_ request: RequestProtocol, authToken: String = "")
Sorry, sometimes I have to ask the question publicly before I can see whatβs in front of my face.
1 Like
Welcome to the Forum @seeker44 ! And thanks for sharing your solution.