You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let xmlObject =// Your data to xml object conversion
95
-
try!T(object: xmlObject) as T
96
-
}
97
-
}
98
-
}
99
-
```
100
-
```XMLMappable``` defines the protocol, response model objects must conform to. The model class conforming to this protocol is responsible to convert a generic representation of the model into it’s specialized form.
101
-
```XMLResource<T : XMLMappable>``` defines a resource based on a given ```XMLMappable``` model. The parse function is responsible of converting raw response data to a generic representation.
102
-
103
77
## Accessing HTTPResponse
104
78
105
79
Request your resource and handle the result & response. This is similar to just requesting a resulting model.
106
80
```swift
107
81
networkService.request(resource, onCompletionWithResponse: { htmlText, response in
108
82
print(htmlText)
83
+
print(response)
109
84
}, onError: { error in
110
85
//Handle errors
111
86
})
@@ -122,7 +97,6 @@ The following table shows all the protocols and their default implementations.
0 commit comments