Skip to content

Reduce code duplication in the authorization #272

@brunoocasali

Description

@brunoocasali

These lines are duplicated 5 times in the Request class.

if let apiKey = config.apiKey {
  let bearer = "Bearer \(apiKey)"
  request.addValue(bearer, forHTTPHeaderField: "Authorization")
}

We could find a way to remove this duplication :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions