ronanrodrigo/Frisbee

Implement other HTTP verbs

ronanrodrigo opened this issue · 1 comments

Implement all (post, put, patch, delete) HTTP verbs. Creating other classes like NetworkGetter to keep it conforms to SOLID.

@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.