How to complete the challenge GET /todos/export (200) tab-delimited download
This challenge exports todos as tab-delimited data. Tab-delimited content is often called TSV, which means tab-separated values. The endpoint accepts both format=tsv and format=tab-delimited.
GET /todos/export tab-delimited download
Issue a GET request on the
/todos/export?format=tsvend point and receive a tab-delimited response with aContent-Dispositionheader fortodos.tsv.
GETasks the API to return the todos./todos/exportuses aformatquery parameter to choose the representation.format=tsvrequests tab-separated values.format=tab-delimitedis an alias for the same export.Content-Disposition: attachmenttells the client this can be treated as a file download.filename="todos.tsv"suggests the download filename.- Add the
X-CHALLENGERheader to track progress.
Basic Instructions
- Issue a
GETrequest to end point "/todos/export?format=tsv"- if running locally that endpoint would be
https://apichallenges.eviltester.com/todos/export?format=tsv
- if running locally that endpoint would be
- The request should have an
X-CHALLENGERheader to track challenge completion. - The response status code should be
200. - Check the
Content-Typeresponse header starts withtext/tab-separated-values. - Check the
Content-Dispositionresponse header isattachment; filename="todos.tsv". - Check the response body contains tab-delimited data.
The format query parameter controls the export type for this endpoint. For this challenge, format=tsv and format=tab-delimited should both produce the same response type and filename.
Try it now
Example Request
> GET /todos/export?format=tsv HTTP/1.1
> Host: apichallenges.eviltester.com
> User-Agent: rest-client
> X-CHALLENGER: x-challenger-guid
> Accept: text/tab-separated-values
Example Response
< HTTP/1.1 200 OK
< Content-Type: text/tab-separated-values
< Content-Disposition: attachment; filename="todos.tsv"
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: *
< X-Challenger: x-challenger-guid
Example Response body:
id title doneStatus description
1 scan paperwork false
2 file paperwork true
Extra Experiment
Open todos.tsv in your browser to request the tab-delimited export directly.
Other format parameter values to try include json, xml, csv, text, html, ndjson, jsonl, json-seq, and tab-delimited. The text aliases txt and plain, JSON sequence alias jsonseq, and tab aliases tab, tabs, and tab-separated are also supported.
Repeat the request with /todos/export?format=tab-delimited. It should still return Content-Type: text/tab-separated-values and Content-Disposition: attachment; filename="todos.tsv".