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

Add csv response content type to http query endpoint #7097

Conversation

corylanou
Copy link
Contributor

Adds ability to get http query responses back in csv format.

Actual data:

Using database foo
> select * from cpu
name: cpu
---------
time                    rack    region  val
1469735393542775676                     1
1469740758548191803     200     east    1

Curl command issued:

$ curl -H "Content-Type: application/csv" -G http://localhost:8086/query --data-urlencode "db=foo" --data-urlencode "pretty=true" --data-urlencode "q=SELECT * FROM foo..cpu"

Response:

name,time,rack,region,val
cpu,2016-07-28 19:49:53.542775676 +0000 UTC,,,1
cpu,2016-07-28 21:19:18.548191803 +0000 UTC,200,east,1
  • Rebased/mergable
  • Tests pass
  • CHANGELOG.md updated

/cc @jsternberg

jsternberg and others added 2 commits June 10, 2016 14:58
…pe header

Only `application/json` is supported right now, but this opens up the
easier possibility of additional content types to be returned from the
server.
@mention-bot
Copy link

@corylanou, thanks for your PR! By analyzing the annotation information on this pull request, we identified @e-dard, @gunnaraasen and @joelegasse to be potential reviewers

@jsternberg
Copy link
Contributor

This looks similar to #6815 and that one should probably be merged first so this one can be based off of that.

@corylanou
Copy link
Contributor Author

Per our conversation, it's based on the branch you are referencing. If you have it already done, we can delete this PR.

@jsternberg jsternberg force-pushed the js-content-type-response-writer branch from d2d4cba to d85072a Compare July 29, 2016 18:15
@corylanou
Copy link
Contributor Author

closing in favor of #7099

@corylanou corylanou closed this Jul 29, 2016
@corylanou corylanou deleted the cjl-content-type-csv-response-writer branch July 29, 2016 20:27
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.

3 participants