-
-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Why is the new feature needed? What purpose does it serve?
After doing a bit of searching, I didn't find a class that would send a CSV response. There were the Text, JSON, HTML, Redirect, XML, and Empty response classes, but nothing specific to CSV. So I created this PR to add a CSV response class, which can send both plain CSV text as well as a response that will be interpreted by the client as a downloadable file.
How will users use the new feature?
Users can use the CSV response class very similarly to how they use the existing response classes. The only difference is that if they supply a file name as the third parameter to the constructor, then a download response will be sent, not a textual response.
Originally posted by @settermjd at zendframework/zend-diactoros#361