隨着我正在使用的服務,大多數響應都是使用XML,但其中一些是純文本。什麼是最好的方式來設置? 目前我有這樣的: // Root should return plain text, don't try to transform it
configureTransformer("/") { (content: String, entity) -> String? in
return con
我正在爲基於Siesta的類編寫一個測試,並試圖訪問從服務器收到的錯誤。在我的對象,我配置一樣的服務,以便: self.service.configure {
$0.config.pipeline[.parsing].add(SwiftyJSONTransformer, contentTypes: ["*/json"])
// other configuration se
我有一個循環,我POST請求到服務器: for (traineeId, points) in traineePointsDict {
// create a new point
let parameters: NSDictionary = [
"traineeId": "\(traineeId)",
"numPoints": points,