Download Latest Version 3.0.7 source code.tar.gz (319.8 kB)
Email in envelope

Get an email when there's a new version of Wretch

Home / 3.0.3
Name Modified Size InfoDownloads / Week
Parent folder
3.0.3 source code.tar.gz 2025-11-10 282.9 kB
3.0.3 source code.zip 2025-11-10 452.8 kB
README.md 2025-11-10 1.1 kB
Totals: 3 Items   736.9 kB 0

3.0.3 (2025-11-10)

:bug: Bug fix(es)

  • Use body size when available to compute upload total bytes (27c0443), closes #278

    :::ts import wretch from "wretch" import ProgressAddon from "wretch/addons/progress"

    const testString = Array(50_000).fill("This is a test string.") const file = new File(testString, "test.txt", { type: "text/plain" })

    wretch("https://httpbin.org/post") .addon(ProgressAddon()) .content("text/plain") .body(file) .onUpload((loaded, total) => { console.log(Uploaded ${loaded} of ${total}) }) .post() .res(res => console.log(res.status)) .catch(console.error)

    :::bash Uploaded 0 of 1100000 Uploaded 589824 of 1100000 Uploaded 1100000 of 1100000

:white_check_mark: Test improvement(s)

Source: README.md, updated 2025-11-10