setBasicAuth(username:password:)

Set basic auth for a request.

HTTPClientRequest+auth.swift:24
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
mutating func setBasicAuth(username: String, password: String)

Parameters

username

the username to authenticate with

password

authentication password associated with the username