parameter-sending fix
This commit is contained in:
parent
f10032a628
commit
15aab281b7
@ -14,7 +14,7 @@
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = 'primary'
|
||||
BlueprintIdentifier = '8AD12304DD8FAE48F309E20F'
|
||||
BlueprintIdentifier = '041BA5B826EC5428B1E56808'
|
||||
BlueprintName = 'Alamofire'
|
||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
||||
BuildableName = 'Alamofire.framework'>
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = 'primary'
|
||||
BlueprintIdentifier = 'EC0D4C433502670E5C43BA77'
|
||||
BlueprintIdentifier = '4153DC145034BF1C168BD17C'
|
||||
BlueprintName = 'Pods'
|
||||
ReferencedContainer = 'container:Pods.xcodeproj'
|
||||
BuildableName = 'Pods.framework'>
|
||||
|
||||
Binary file not shown.
@ -178,12 +178,19 @@ class WebserviceClient {
|
||||
"domain": domain,
|
||||
"token": token
|
||||
]*/
|
||||
let parameters = [
|
||||
/*let parameters = [
|
||||
"": "{\"domain\":\"\(domain)\", \"token\":\"\(token)\"}"
|
||||
]
|
||||
Alamofire.request(.POST, Constants.WebService.UPDATE, headers: headers, parameters: parameters)
|
||||
//.validate(statusCode: 200..<201)
|
||||
//.validate(contentType: ["application/json"])
|
||||
]*/
|
||||
let parameters : String = "{\"domain\":\"\(domain)\", \"token\":\"\(token)\"}"
|
||||
|
||||
Alamofire.request(.POST, Constants.WebService.UPDATE, headers: headers, parameters: [:], encoding: .Custom({
|
||||
(convertible, params) in
|
||||
let mutableRequest = convertible.URLRequest.copy() as! NSMutableURLRequest
|
||||
mutableRequest.HTTPBody = parameters.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
|
||||
return (mutableRequest, nil)
|
||||
}))
|
||||
.validate(statusCode: 200..<201)
|
||||
.validate(contentType: ["application/json"])
|
||||
.responseString { response in
|
||||
/*
|
||||
print(response.request) // original URL request
|
||||
@ -201,8 +208,10 @@ class WebserviceClient {
|
||||
print("WebserviceClient: Error during update:")
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
} // END ALAMOFIRE
|
||||
|
||||
|
||||
} // END IF
|
||||
}
|
||||
|
||||
// MARK: Getter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user