@openfn/language-http 7.0.5 → 7.0.7
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 +3 -2
- package/dist/index.js +3 -2
- package/package.json +3 -3
- package/types/Adaptor.d.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -158,7 +158,7 @@ function request(method, path, params) {
|
|
|
158
158
|
path,
|
|
159
159
|
params
|
|
160
160
|
);
|
|
161
|
-
let { body, contentType = "json", headers = {} } = resolvedParams;
|
|
161
|
+
let { body, contentType = "json", headers = {}, parseAs } = resolvedParams;
|
|
162
162
|
const contentTypeHeader = Object.keys(headers).find(
|
|
163
163
|
(key) => key.toLowerCase() === "content-type"
|
|
164
164
|
);
|
|
@@ -192,7 +192,8 @@ function request(method, path, params) {
|
|
|
192
192
|
baseUrl,
|
|
193
193
|
body,
|
|
194
194
|
tls,
|
|
195
|
-
maxRedirections
|
|
195
|
+
maxRedirections,
|
|
196
|
+
parseAs
|
|
196
197
|
};
|
|
197
198
|
return (0, import_util.request)(method, resolvedPath, options).then((response) => {
|
|
198
199
|
const { body: body2, ...responseWithoutBody } = response;
|
package/dist/index.js
CHANGED
|
@@ -110,7 +110,7 @@ function request(method, path, params) {
|
|
|
110
110
|
path,
|
|
111
111
|
params
|
|
112
112
|
);
|
|
113
|
-
let { body, contentType = "json", headers = {} } = resolvedParams;
|
|
113
|
+
let { body, contentType = "json", headers = {}, parseAs } = resolvedParams;
|
|
114
114
|
const contentTypeHeader = Object.keys(headers).find(
|
|
115
115
|
(key) => key.toLowerCase() === "content-type"
|
|
116
116
|
);
|
|
@@ -144,7 +144,8 @@ function request(method, path, params) {
|
|
|
144
144
|
baseUrl,
|
|
145
145
|
body,
|
|
146
146
|
tls,
|
|
147
|
-
maxRedirections
|
|
147
|
+
maxRedirections,
|
|
148
|
+
parseAs
|
|
148
149
|
};
|
|
149
150
|
return commonRequest(method, resolvedPath, options).then((response) => {
|
|
150
151
|
const { body: body2, ...responseWithoutBody } = response;
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-http",
|
|
3
|
-
"
|
|
3
|
+
"label": "HTTP",
|
|
4
|
+
"version": "7.0.7",
|
|
4
5
|
"description": "An HTTP request language package for use with Open Function",
|
|
5
6
|
"homepage": "https://docs.openfn.org",
|
|
6
7
|
"repository": {
|
|
@@ -28,12 +29,11 @@
|
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"cheerio": "1.0.0-rc.12",
|
|
30
31
|
"cheerio-tableparser": "^1.0.1",
|
|
31
|
-
"@openfn/language-common": "2.
|
|
32
|
+
"@openfn/language-common": "2.5.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"chai": "^4.3.10",
|
|
35
36
|
"deep-eql": "4.1.1",
|
|
36
|
-
"esno": "^0.16.3",
|
|
37
37
|
"mocha-suppress-logs": "^0.4.1",
|
|
38
38
|
"rimraf": "^3.0.2"
|
|
39
39
|
},
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* @property data - the parsed response body
|
|
18
18
|
* @property response - the response from the HTTP server, including headers, statusCode, body, etc
|
|
19
19
|
* @property references - an array of all previous data objects used in the Job
|
|
20
|
+
* @private
|
|
20
21
|
**/
|
|
21
22
|
/**
|
|
22
23
|
* Execute a sequence of operations
|