curlnapi-node 0.1.9 → 0.1.11
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/index.d.ts +2 -1
- package/index.wrapper.js +10 -5
- package/package.json +1 -1
- package/storage/key_value_stores/default/SDK_CRAWLER_STATISTICS_0.json +27 -0
- package/storage/key_value_stores/default/SDK_SESSION_POOL_STATE.json +26 -0
- package/storage/request_queues/default/yxf2frnzAiMpu2N.json +9 -0
package/index.d.ts
CHANGED
package/index.wrapper.js
CHANGED
|
@@ -30,17 +30,23 @@ async function parseFetchOptions(resource, init) {
|
|
|
30
30
|
} else {
|
|
31
31
|
url = resource
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
const headerEntries = canonicalizeHeaders(options?.headers)
|
|
34
34
|
if (options?.body) {
|
|
35
35
|
const { body, type } = await castToTypedArray(options.body)
|
|
36
36
|
options.body = body
|
|
37
|
-
if (type && !
|
|
38
|
-
|
|
37
|
+
if (type && !headerEntries.some(([k]) => String(k).toLowerCase() === 'content-type')) {
|
|
38
|
+
headerEntries.push(['Content-Type', type])
|
|
39
39
|
}
|
|
40
40
|
} else {
|
|
41
41
|
delete options.body
|
|
42
42
|
}
|
|
43
|
-
const out = {
|
|
43
|
+
const out = {
|
|
44
|
+
url,
|
|
45
|
+
method: options.method,
|
|
46
|
+
headers: Object.fromEntries(headerEntries),
|
|
47
|
+
body: options.body,
|
|
48
|
+
signal: options.signal,
|
|
49
|
+
}
|
|
44
50
|
if (typeof options.timeout === 'number') out.timeout = options.timeout
|
|
45
51
|
return out
|
|
46
52
|
}
|
|
@@ -109,4 +115,3 @@ module.exports.HttpMethod = {
|
|
|
109
115
|
TRACE: 'TRACE',
|
|
110
116
|
CONNECT: 'CONNECT',
|
|
111
117
|
}
|
|
112
|
-
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"requestsFinished": 1,
|
|
3
|
+
"requestsFailed": 0,
|
|
4
|
+
"requestsRetries": 0,
|
|
5
|
+
"requestsFailedPerMinute": 0,
|
|
6
|
+
"requestsFinishedPerMinute": 25,
|
|
7
|
+
"requestMinDurationMillis": 1880,
|
|
8
|
+
"requestMaxDurationMillis": 1880,
|
|
9
|
+
"requestTotalFailedDurationMillis": 0,
|
|
10
|
+
"requestTotalFinishedDurationMillis": 1880,
|
|
11
|
+
"crawlerStartedAt": "2026-01-18T13:33:56.504Z",
|
|
12
|
+
"crawlerFinishedAt": "2026-01-18T13:33:58.884Z",
|
|
13
|
+
"statsPersistedAt": "2026-01-18T13:33:58.884Z",
|
|
14
|
+
"crawlerRuntimeMillis": 2399,
|
|
15
|
+
"crawlerLastStartTimestamp": 1768743236485,
|
|
16
|
+
"requestRetryHistogram": [
|
|
17
|
+
1
|
|
18
|
+
],
|
|
19
|
+
"statsId": 0,
|
|
20
|
+
"requestAvgFailedDurationMillis": null,
|
|
21
|
+
"requestAvgFinishedDurationMillis": 1880,
|
|
22
|
+
"requestTotalDurationMillis": 1880,
|
|
23
|
+
"requestsTotal": 1,
|
|
24
|
+
"requestsWithStatusCode": {},
|
|
25
|
+
"errors": {},
|
|
26
|
+
"retryErrors": {}
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"usableSessionsCount": 1,
|
|
3
|
+
"retiredSessionsCount": 0,
|
|
4
|
+
"sessions": [
|
|
5
|
+
{
|
|
6
|
+
"id": "session_N8sbcCnMc0",
|
|
7
|
+
"cookieJar": {
|
|
8
|
+
"version": "tough-cookie@6.0.0",
|
|
9
|
+
"storeType": "MemoryCookieStore",
|
|
10
|
+
"rejectPublicSuffixes": true,
|
|
11
|
+
"enableLooseMode": false,
|
|
12
|
+
"allowSpecialUseDomain": true,
|
|
13
|
+
"prefixSecurity": "silent",
|
|
14
|
+
"cookies": []
|
|
15
|
+
},
|
|
16
|
+
"userData": {},
|
|
17
|
+
"maxErrorScore": 3,
|
|
18
|
+
"errorScoreDecrement": 0.5,
|
|
19
|
+
"expiresAt": "2026-01-18T14:23:56.986Z",
|
|
20
|
+
"createdAt": "2026-01-18T13:33:56.986Z",
|
|
21
|
+
"usageCount": 1,
|
|
22
|
+
"maxUsageCount": 50,
|
|
23
|
+
"errorScore": 0
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "yxf2frnzAiMpu2N",
|
|
3
|
+
"json": "{\"id\":\"yxf2frnzAiMpu2N\",\"url\":\"https://httpbin.org/get\",\"loadedUrl\":\"https://httpbin.org/get\",\"uniqueKey\":\"https://httpbin.org/get\",\"method\":\"GET\",\"noRetry\":false,\"retryCount\":0,\"errorMessages\":[],\"headers\":{\"Cache-Control\":\"max-age=0\",\"Upgrade-Insecure-Requests\":\"1\",\"User-Agent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36\",\"Accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\"Accept-Language\":\"en-GB,en;q=0.9\",\"Cookie\":\"session-id=520-3432763-6619032; lc-acbuk=en_GB; ubid-acbuk=261-8790247-0855808; sso-state-acbuk=Xdsso|ZQG-J6z6kqG231syhNdNwhS5_Q7lcebxYKWUYRvz0Svu0x-axk_3b2Rb5NEeGPEAXIjkHc8KUNsUJgDg6MbaRuVXDRZg5ajuU505UwHWg8KZ3Ovr; i18n-prefs=GBP; at-acbuk=Atza|gQC4SOQtAwEBALe-NKeevTEzTSfrCiEdLfTAZiaglHSVfBbK2B_RpLt4rMAMIprXUtKQFv0gCICBSKWRuGpN9a_nAIW_SdgiFXfiREYIUEV19FIHjYgSMpGmgmtdwYqN48lecXt1-71N5FWHUt1o34rRZHkTPyYwfjuaxjHL3r_xGZjP2H5pYX3i5l5w3KP87RAbLP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tzu878qvouJdTSEA9eu0I7+h7iEH2e3t97vWE47MFOrzKJC1YTGJPhiSW8=\"},\"userData\":{\"__crawlee\":{\"state\":4}},\"handledAt\":\"2026-01-18T13:33:58.863Z\"}",
|
|
4
|
+
"method": "GET",
|
|
5
|
+
"orderNo": null,
|
|
6
|
+
"retryCount": 0,
|
|
7
|
+
"uniqueKey": "https://httpbin.org/get",
|
|
8
|
+
"url": "https://httpbin.org/get"
|
|
9
|
+
}
|