New in 2.4: Test runs you can trust See what's new →

Téléchargements de fichiers

Tests de téléchargement de fichiers : pièce jointe ou inline, binaires déterministes, requêtes HTTP Range et gros téléchargements en streaming. Tout le contenu est fixe ou généré de façon déterministe.

Exemple de requête

List the downloadable sample files with their size and SHA-256. Référence complète et bouton Send (en anglais).

cURL
curl -X GET "https://api.testingapis.com/api/files"
Exécuter dans Studio
Réponse · 200 OK
[
  {
    "name": "sample.txt",
    "contentType": "text/plain; charset=utf-8",
    "size": 184,
    "sha256": "23125fa5f44a3be386c2954e4735fdabfd16085e051998625af844ce7c9a0d49",
    "download": "/api/files/sample.txt",
    "inline": "/api/files/sample.txt/inline"
  },
  {
    "name": "sample.csv",
    "contentType": "text/csv; charset=utf-8",
    "size": 311,
    "sha256": "c6bf07b23b626e60e9863a66c4c93a6193b4c5c85d9d3cb4a5e4b2d09b0b96cb",
… (5 more lines)