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