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

Refactor Kakapo to not be JSON centric #153

Open
MP0w opened this issue Mar 19, 2017 · 0 comments
Open

Refactor Kakapo to not be JSON centric #153

MP0w opened this issue Mar 19, 2017 · 0 comments

Comments

@MP0w
Copy link
Member

MP0w commented Mar 19, 2017

See discussion in: #150

MP0w added a commit that referenced this issue Mar 19, 2017
This is a draft PR to address #153, I want some feedback before proceeding with updating the documentation, README, tests
The idea is that Router now doesn’t work anymore w/ `Serializable` objects and `ResponseFieldsProvider` is not anymore a special `Serializable`.
Router now only accept `ResponseFieldsProvider`s an object that provides:
statusCode (Int)
headerfields (dict)
body (data)

`Serializable` became a `ResponseFieldsProvider` that by default has a status code == 200 and “Content-Type” == “application/json”.
It should have been like that since ever, so we can use Kakapo with images, xml or whatever we want by creating new `ResponseFieldsProvider `

The change is a breaking change but not a big one for users of Kakapo (only objects that were confirming to ResponseFieldsProvider will be broken)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants