@digipair/skill-http 0.126.0 → 0.127.0
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.
package/dist/index.cjs.js
CHANGED
|
@@ -39,6 +39,10 @@ let HttpService = class HttpService {
|
|
|
39
39
|
} else {
|
|
40
40
|
result = await responseText;
|
|
41
41
|
}
|
|
42
|
+
} else if (this.type === 'base64') {
|
|
43
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
44
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
45
|
+
result = 'data:' + response.headers.get('content-type') + ';base64,' + buffer.toString('base64');
|
|
42
46
|
} else {
|
|
43
47
|
const arrayBuffer = await response.arrayBuffer();
|
|
44
48
|
const buffer = Buffer.from(arrayBuffer);
|
package/dist/index.esm.js
CHANGED
|
@@ -37,6 +37,10 @@ let HttpService = class HttpService {
|
|
|
37
37
|
} else {
|
|
38
38
|
result = await responseText;
|
|
39
39
|
}
|
|
40
|
+
} else if (this.type === 'base64') {
|
|
41
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
42
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
43
|
+
result = 'data:' + response.headers.get('content-type') + ';base64,' + buffer.toString('base64');
|
|
40
44
|
} else {
|
|
41
45
|
const arrayBuffer = await response.arrayBuffer();
|
|
42
46
|
const buffer = Buffer.from(arrayBuffer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-http.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-http.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"skill-http.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-http.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA8JhD,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC;AAE7E,eAAO,MAAM,IAAI,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC;AAE3E,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC;AAE7E,eAAO,MAAM,aAAa,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACb,CAAC;AAE7E,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC;AAE7E,eAAO,MAAM,OAAO,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC;AAE9E,eAAO,MAAM,MAAM,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACN,CAAC"}
|