-
Notifications
You must be signed in to change notification settings - Fork 0
Content type header
Files must be sent to the API via HTTP POST requests. The API is designed to accept many different types of files, and in order to simplify code and improve reliability, users have to explicitly specify the type of file, by using the Content-Type header.
Currently, these are the supported file types and their corresponding Content-Type value:
| File type | Implemented | Extension | Content-Type |
|---|---|---|---|
| CSV | * | .csv |
text/csv |
| Tab separated | * |
.txt or tsv
|
text/tab-separated-values |
| DarwinCore Archive | .zip |
application/zip |
|
| DarwinCore Archive (preferred) | .zip |
application/x-dwca |
|
| JSON | .json |
application/json |
Note the (future) use of application/x-dwca for DarwinCore Archives. Even if they are zip files, they are special in the sense that (ideally) all share the same structure, and these zip files could be different than other zip files. For example, if a user sends a DWCA with a custom id field, this field will be reflected in the meta.xml file, so the service might be able to parse this file looking for the proper value of the id field.
This repository is part of the VertNet project.
For more information, please check out the project's home page and GitHub organization page