У меня возникли проблемы с выяснением того, как читать XML-контент с помощью Siesta. Я пробовал такие вещи (в моем подклассе Service):Использование Siesta с XML
configureTransformer("*") { (content: NSData, entity) -> NSXMLDocument? in
return try? NSXMLDocument(data: content, options: 0)
}
.. но, похоже, его не называют. Я на правильном пути?
Update: Вот журнал Сиеста для одного ресурса:
[Siesta:Configuration] Computing configuration for GET Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[]
[Siesta:Configuration] Applying config 0 [Siesta default response parsers] to Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[]
[Siesta:Configuration] Applying config 1 [custom] to Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[]
[Siesta:Staleness] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[] is not up to date: no error | no data
[Siesta:Network] GET https://[host]/httpAuth/app/rest/builds/running:any,branch:develop
[Siesta:Observers] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[L] sending Requested to 1 observer
[Siesta:Observers] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[L] sending Requested to <XTSideBarDataSource: 0x600000091440>
[Siesta:Network] 200 ← GET https://[host]/httpAuth/app/rest/builds/running:any,branch:develop
[Siesta:StateChanges] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[] received new data from Network : Entity(content: <OS_dispatch_data: data[0x61000026a4c0] = { leaf, size = 3201, buf = 0x1021f2200 }>, charset: nil, headers: ["cache-control": "no-cache, no-store", "strict-transport-security": "max-age=31536000; includeSubDomains", "content-length": "3201", "content-type": "application/xml", "set-co…
[Siesta:Observers] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[D] sending NewData(Network) to 1 observer
[Siesta:Observers] Siesta.Resource(https://[host]/httpAuth/app/rest/builds/running:any,branch:develop)[D] sending NewData(Network) to <XTSideBarDataSource: 0x600000091440>
Это на OS X, я так понимаю? –
Да, это правильно. – Uncommon
В журнале нет ответных трансформаторов, что любопытно. Может быть OS X ... er, связанный с macOS. Будет расследоваться на месте. –