apify-client 3.0.0-beta.26 → 3.0.0-beta.27
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/body_parser.js +2 -2
- package/dist/bundle.js +27 -22
- package/dist/bundle.js.map +1 -1
- package/dist/generated/schemas.d.ts +313 -313
- package/dist/http_compressors/resolve.d.ts +1 -1
- package/dist/timeouts.d.ts +6 -6
- package/dist/timezones.d.ts +1 -1
- package/package.json +10 -11
package/dist/body_parser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { parse as parseContentType } from 'content-type';
|
|
2
2
|
const CONTENT_TYPE_JSON = 'application/json';
|
|
3
3
|
const STRINGIFIABLE_CONTENT_TYPE_RXS = [new RegExp(`^${CONTENT_TYPE_JSON}`, 'i'), /^application\/.*xml$/i, /^text\//i];
|
|
4
4
|
/**
|
|
@@ -15,7 +15,7 @@ export function maybeParseBody(body, contentTypeHeader) {
|
|
|
15
15
|
let contentType;
|
|
16
16
|
let charset;
|
|
17
17
|
try {
|
|
18
|
-
const result =
|
|
18
|
+
const result = parseContentType(contentTypeHeader);
|
|
19
19
|
contentType = result.type;
|
|
20
20
|
charset = result.parameters.charset;
|
|
21
21
|
}
|