kuzzleio / kuzzle

Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
https://kuzzle.io
Apache License 2.0
1.44k stars 124 forks source link

Should enforce JSON content only for native API routes #634

Closed scottinet closed 6 years ago

scottinet commented 7 years ago

Currently, Kuzzle forces incoming requests to be in JSON format for all possible API routes.

Instead, it should restrict this check only for the native API routes. We shouldn't force plugins to accept JSON, as there are cases where supporting other formats would be beneficial.

Use case: CSV data import route

gandbox commented 7 years ago

@kuzzleio/owners still needed after WRBM & CMX projects ?

stafyniaksacha commented 7 years ago

Yes, we need to allow plugins to handle what they want in input

ballinette commented 7 years ago

I guess this is more a proxy-related issue.

Note that for the CSV data import use case, it's not needed anymore as the proxy is now able to manage file upload through HTTP, the file data is then given to Kuzzle as a base64-encoded JSON attribute (see https://github.com/kuzzleio/kuzzle-proxy/pull/47 )

ballinette commented 6 years ago

I guess the way the HTTP entrypoint manage incoming request now is OK for all use cases. Feel free to reopen the issue if there is a use case that is not correctly managed.