随着我正在使用的服务,大多数响应都是使用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,