rest-book
rest-book copied to clipboard
CSV data request output doesn't set text/csv mime type
I tried GET with csv data file: https://github.com/RandomFractals/vscode-data-table/blob/main/data/usa-airports.csv
Your default Data renderer loads and shows that CSV data. However, I expected cell output to be of type text/csv
, not application/json
. Because of that I don't get an option to pick the CSV data mime-type for cell output rendering ...
@tanhakabir see updated test restbook that shows correct request/response headers when you run second GET cell for CSV data request: https://github.com/RandomFractals/vscode-data-table/blob/main/notebooks/chicago-traffic-tracker.restbook
I still get json mime type output for that request too.
to clarify, I don't have a csv renderer currently, woudl you expect as csv renderer that you have from the marketplace be the default or the builtin monaco renderer to be shown?
I think you should set your cell output mime type to the response mime type and show your plain text in a data tab.
@tanhakabir btw, any update when you can patch this? see this ticket in my repo that has more fixes: https://github.com/RandomFractals/vscode-data-table/issues/38
In general, I found that many notebook types don't set cell output mime type correctly for me to use that new output renderer api and grab the data I need based on mime type.