Implement other HTTP verbs
ronanrodrigo opened this issue · 1 comments
ronanrodrigo commented
amadeu01 commented
@ronanrodrigo I was working on add the DELETE Verb.
However, in the tests, it sends me 204 (NOT_CONTENT), but it is not a fail.
Nevertheless, on the ResultGenerator
let result: Result<T>
do {
let entityDecoded = try decoder.decode(T.self, from: data)
result = .success(entityDecoded)
} catch {
result = .fail(.noData)
}
I was wondering about changing the Result from an enum to struct, where it is possible to store the HTTP status code, HTTP message and the body if exists.