Comparing version 0.14.0 to 0.15.0
{ | ||
"name": "jsh", | ||
"version": "0.14.0", | ||
"version": "0.15.0", | ||
"description": "Helpers for Bash like shell scripting in JavaScript", | ||
@@ -5,0 +5,0 @@ "author": "Brady Holt", |
@@ -231,5 +231,5 @@ # jsh | ||
const filePath = "./my_image.jpg"; | ||
const imageStream = fs.createReadStream(filePath); | ||
const data = fs.createReadStream(filePath); | ||
const fileSize = fs.statSync(filePath).size; | ||
await http.post("https://fakeimageserver.com/uploads", imageStream, { | ||
await http.post("https://fakeimageserver.com/uploads", data, { | ||
"Content-Type": "image/jpeg", | ||
@@ -250,3 +250,2 @@ "Content-Length": fileSize, | ||
| `User-Agent` | `jsh` | | ||
| `Transfer-Encoding` | `chunked` when `data` parameter is a stream | | ||
@@ -253,0 +252,0 @@ ### Error Handling |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66321
1447
400