-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Allow overridden parameter types on GET/DELETE #264
base: master
Are you sure you want to change the base?
Conversation
@3lvis After the above PR, have another, which is the introduction of an import Foundation
public protocol ErrorLogger {
func log(_ message: String)
func flush()
}
class ConsoleErrorLogger : ErrorLogger {
func log(_ message: String) {
print(message)
}
func flush() {} // Not required for console
} Default (provided) implementation logs to console, just as currently, custom version can, for example, log to Sentry. |
@jasperblues It seems to me that the name chosen is not entirely successful. We can log not only errors, but any messages in general, right? Maybe a name like |
After all, the name |
Ah yes @mkll you're right, that was a terrible choice! |
(More complicated, but better) A |
… for eg log to sentry.
I'm not sure if this will be useful to others (hopefully, as it will alleviate our need to sync with upstream) however I needed to add support for DELETE with a JSON request body. (API didn't strictly adhere to spec).
For uniformity, provided also for GET. (In the past I have seen GET reqs with url encoded params along with a serialized body - this would not be supported).