Redirect Release route with accept header to CSV or JSON file route.
When a Release route receives an allowed Accept: text/csv it should not serve the content from its route but instead redirect users to the same file route with the .csv extension. Same for application/json (redirects with .json extension)
This PR is only the first step. The next step from the linked issue will be serving of the CSVW metadata itself:
"In order to fullfill our obligations to the CSVW spec we should then also support the following route which is where we will map our datahost schema into CSVW."
Partially addresses issue https://github.com/Swirrl/datahost-prototypes/issues/184
Redirect Release route with accept header to CSV or JSON file route.
When a Release route receives an allowed
Accept: text/csv
it should not serve the content from its route but instead redirect users to the same file route with the.csv
extension. Same for application/json (redirects with.json
extension)This PR is only the first step. The next step from the linked issue will be serving of the CSVW metadata itself:
"In order to fullfill our obligations to the CSVW spec we should then also support the following route which is where we will map our datahost schema into CSVW."
/data/dataset-series/release/:release-id.csv-metadata.json