kvz / cakephp-rest-plugin

Discontinued: recent cakephp versions overlap functionality, there also is @ceeram's plugin. Painless REST server Plugin for CakePHP
http://kvz.io/blog/2010/01/13/cakephp-rest-plugin-presentation/
169 stars 37 forks source link

CSV view #7

Closed primeminister closed 13 years ago

primeminister commented 13 years ago

He Kevin, I'm busy with adding CSV format to the views. Some issue I came across:

I think the second is ok when using CSV. I will fork and send you the link to look at the code.

Cheers!

kvz commented 13 years ago

I would not transport CSV "as-is". Rather use the REST protocol to wrap CSV in an element and let your api-client handle further processing. Or don't use the API at all, just create a view that Set::extracts & outputs raw CSV. That's how I do .pdf as well.

primeminister commented 13 years ago

I don't understand the latest option. You mean without REST? The problem is that I'm building an API only. So no HTML version of it. And it is easy-peasy with your plugin. The only thing is that clients expect csv output...

Check https://github.com/primeminister/cakephp-rest-plugin/blob/master/views/csv.php for the current implementation