append query items, don't overwrite everything
This commit is contained in:
parent
d26b3b9917
commit
d1b4c20494
@ -40,9 +40,9 @@ public extension URLRequest {
|
|||||||
guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
|
guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
components.queryItems = [
|
var queryItems = components.queryItems ?? []
|
||||||
URLQueryItem(name: "access_token", value: credentials.secret),
|
queryItems.append(URLQueryItem(name: "access_token", value: credentials.secret))
|
||||||
]
|
components.queryItems = queryItems
|
||||||
self.url = components.url
|
self.url = components.url
|
||||||
case .readerBasic:
|
case .readerBasic:
|
||||||
setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
|
setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user