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

Added a CSV handler in the core handlers #32

Merged
merged 4 commits into from
Jun 7, 2012
Merged

Conversation

aonic
Copy link
Contributor

@aonic aonic commented Jun 4, 2012

It uses the built-in fgetcsv and fputcsv PHP functions to handle CSV data. It also works for services returning CSV data which is expected to be parsed as a table, and not a single line response.

@nategood
Copy link
Owner

nategood commented Jun 5, 2012

Thanks. GitHub is showing some weird diffs. I suspect it is due to whitespace. Can you make sure this is using soft tabs (4 spaces) instead of hard tabs?

@aonic
Copy link
Contributor Author

aonic commented Jun 5, 2012

I saw that as well. I did use soft tabs and for some reason its still
showing the weird diffs.

Might be because I used the new Github for Windows client. Should I try
doing a new commit or is there an easier way to fix the whitespace diff
issues?

In the client window it shows the diffs correctly: http://i.minus.com/iwzeIYs9E5zXY.png

@aonic
Copy link
Contributor Author

aonic commented Jun 5, 2012

It was the ^M at the end of the lines. dos2unix.exe fixed it. Will recommit fixed version

@nategood
Copy link
Owner

nategood commented Jun 5, 2012

Great. That was going to be my next question but looks like you found it already. I'll review, merge, and tag it this evening.

@nategood
Copy link
Owner

nategood commented Jun 6, 2012

Please add some unit tests for this handler (e.g. see the testJsonResponseParse test in HttpfulTest.php). There is decent test coverage and I'd like to keep that up. Thanks!

nategood pushed a commit that referenced this pull request Jun 7, 2012
Added a CSV handler in the core handlers
@nategood nategood merged commit 62574f0 into nategood:master Jun 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants