Unduhan file
Pengujian unduhan file: lampiran atau inline, blob biner deterministik, request HTTP Range, dan unduhan besar secara streaming. Semua isi bersifat tetap atau dibuat secara deterministik.
Akun Anda membuka endpoint ini. Pakai Try it di halaman tiap endpoint untuk mengirim request.
Endpoint ini butuh akun gratis. Buat akun atau masuk untuk melihat detailnya dan mencobanya di sini.
- GET
https://api.testingapis.com/api/filesList the downloadable sample files with their size and SHA-256List the downloadable sample files with their size and SHA-256. - GETHEAD
https://api.testingapis.com/api/files/{name}Download a sample file as an attachmentDownload a sample file as an attachment. - GET
https://api.testingapis.com/api/files/{name}/inlineServe a sample file inline so a browser displays itServe a sample file inline so a browser displays it. - GET
https://api.testingapis.com/api/files/bytes/{n}Download deterministic pseudo-random bytesDownload deterministic pseudo-random bytes. - GET
https://api.testingapis.com/api/files/largeStream a large binary download without buffering it in memoryStream a large binary download without buffering it in memory. - GETHEAD
https://api.testingapis.com/api/files/range/{n}Download a verifiable byte pattern that supports HTTP Range requestsDownload a verifiable byte pattern that supports HTTP Range requests.
Contoh request
List the downloadable sample files with their size and SHA-256. Referensi lengkap dan tombol Send (dalam bahasa Inggris).
cURL
curl -X GET "https://api.testingapis.com/api/files"Response · 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)Masuk untuk melihat detailnya
Parameter, contoh request dan response, serta panel Try it langsung untuk endpoint ini khusus anggota yang sudah masuk. Akun gratis dan dibuat dalam beberapa detik.