Revert "Make sure POST body is properly URL-encoded"
This commit is contained in:
parent
d01fa0428a
commit
8384725b01
@ -36,12 +36,8 @@ public extension URLRequest {
|
|||||||
case .readerBasic:
|
case .readerBasic:
|
||||||
setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
|
setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
|
||||||
httpMethod = "POST"
|
httpMethod = "POST"
|
||||||
var postData = URLComponents()
|
let postData = "Email=\(credentials.username)&Passwd=\(credentials.secret)"
|
||||||
postData.queryItems = [
|
httpBody = postData.data(using: String.Encoding.utf8)
|
||||||
URLQueryItem(name: "Email", value: credentials.username),
|
|
||||||
URLQueryItem(name: "Passwd", value: credentials.secret)
|
|
||||||
]
|
|
||||||
httpBody = postData.percentEncodedQuery?.data(using: .utf8)
|
|
||||||
case .readerAPIKey:
|
case .readerAPIKey:
|
||||||
let auth = "GoogleLogin auth=\(credentials.secret)"
|
let auth = "GoogleLogin auth=\(credentials.secret)"
|
||||||
setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization)
|
setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user