Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement other HTTP verbs #8

Open
2 of 3 tasks
ronanrodrigo opened this issue Jan 6, 2018 · 1 comment
Open
2 of 3 tasks

Implement other HTTP verbs #8

ronanrodrigo opened this issue Jan 6, 2018 · 1 comment

Comments

@ronanrodrigo
Copy link
Owner

ronanrodrigo commented Jan 6, 2018

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

@amadeu01
Copy link
Contributor

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

amadeu01 added a commit to amadeu01/Frisbee that referenced this issue Oct 3, 2018
As mentioned at issue ronanrodrigo#8, it should be possible to accept an empty body, like when the server sends 204 (HTTP NOT CONTENT), it could be retrieved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Frisbee Project
  
In progress
Development

No branches or pull requests

2 participants