@openfn/language-http 7.0.5 → 7.0.6

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 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,6 @@
1
1
  {
2
2
  "name": "@openfn/language-http",
3
- "version": "7.0.5",
3
+ "version": "7.0.6",
4
4
  "description": "An HTTP request language package for use with Open Function",
5
5
  "homepage": "https://docs.openfn.org",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "cheerio": "1.0.0-rc.12",
30
30
  "cheerio-tableparser": "^1.0.1",
31
- "@openfn/language-common": "2.3.3"
31
+ "@openfn/language-common": "2.4.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "chai": "^4.3.10",
@@ -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