@jnode/request 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jnode/request",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Simple HTTP(s) package for Node.js.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -114,10 +114,12 @@ async function multipartRequest(method, url, headers, parts, options) {
114
114
  req.write('\r\n');
115
115
  } else if (part.data) { //string or buffer data
116
116
  req.write('\r\n');
117
- req.write(part.data + '\r\n');
117
+ req.write(part.data);
118
+ req.write('\r\n');
118
119
  } else if (part.base64) { //base64 data
119
120
  req.write('Content-Transfer-Encoding: base64\r\n\r\n'); //using base64 encoding
120
- req.write(part.base64 + '\r\n');
121
+ req.write(part.base64);
122
+ req.write('\r\n');
121
123
  } else if (part.stream) { //any readable stream
122
124
  req.write('\r\n');
123
125
  await pipeline(part.stream, req, { end: false });
@@ -126,7 +128,7 @@ async function multipartRequest(method, url, headers, parts, options) {
126
128
  }
127
129
 
128
130
  //end request
129
- req.write(`--${boundary}--\r\n`);
131
+ req.write(`--${boundary}--`);
130
132
  req.end();
131
133
  });
132
134
  }