feat(upload): Added body to download function
Added post functionality to the download function Example
const body = JSON.stringify({ ids: ids });
await download(
url,
path,
({ progress, total }) => console.log(`Downloaded ${progress} of ${total} bytes`),
new Map<string, string>([
['Content-Type', 'application/json'],
]),
body
);
Sorry for the long delay in your first PR. What do you think about leveraging the native Request object for the url and body?
Basically mirroring the http plugin: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/http/guest-js/index.ts#L104
Let me know what you think and whether you'd be open to work on it (if you agree) or if i should take over :)
Sorry for the long delay in your first PR. What do you think about leveraging the native
Requestobject for the url and body?Basically mirroring the http plugin: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/http/guest-js/index.ts#L104
Let me know what you think and whether you'd be open to work on it (if you agree) or if i should take over :)
Hi! Thank you for the feedback.
I understand the request to leverage the native Request object for the URL and body and think it's a good idea.
However, I'm not very familiar with Rust and am not sure how to implement this.
If you could take over this part, that would be fantastic.
Thanks!
Okay sure, no problem!
Package Changes Through d98edb97743a6e003c5a7685b15f1d3e508a629e
There are 2 changes which include upload with patch, upload-js with patch
Planned Package Versions
The following package releases are the planned based on the context of changes in this pull request.
| package | current | next |
|---|---|---|
| upload | 2.2.0 | 2.2.1 |
| upload-js | 2.2.0 | 2.2.1 |
Add another change file through the GitHub UI by following this link.
Read about change files or the docs at github.com/jbolda/covector
i changed my mind, let's keep it simple for now.