@wiajs/request 3.0.0 → 3.0.1
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/.github/ISSUE_TEMPLATE.md +56 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- package/.github/stale.yml +19 -0
- package/.swcrc +57 -0
- package/.travis.yml +21 -0
- package/CHANGELOG.md +717 -0
- package/CONTRIBUTING.md +81 -0
- package/biome.json +44 -0
- package/codecov.yml +2 -0
- package/disabled.appveyor.yml +36 -0
- package/dist/request.cjs +1476 -0
- package/dist/request.mjs +1474 -0
- package/examples/README.md +135 -0
- package/gulpfile.js +71 -0
- package/package.json +1 -2
- package/release.sh +45 -0
- package/tests/browser/karma.conf.js +57 -0
- package/tests/browser/ssl/ca.crt +14 -0
- package/tests/browser/ssl/server.crt +14 -0
- package/tests/browser/ssl/server.key +15 -0
- package/tests/browser/start.js +37 -0
- package/tests/browser/test.js +34 -0
- package/tests/fixtures/har.json +158 -0
- package/tests/googledoodle.jpg +0 -0
- package/tests/server.js +142 -0
- package/tests/squid.conf +76 -0
- package/tests/ssl/ca/README.md +8 -0
- package/tests/ssl/ca/ca.cnf +20 -0
- package/tests/ssl/ca/ca.crl +0 -0
- package/tests/ssl/ca/ca.crt +17 -0
- package/tests/ssl/ca/ca.csr +13 -0
- package/tests/ssl/ca/ca.key +18 -0
- package/tests/ssl/ca/ca.srl +1 -0
- package/tests/ssl/ca/client-enc.key +30 -0
- package/tests/ssl/ca/client.cnf +20 -0
- package/tests/ssl/ca/client.crt +20 -0
- package/tests/ssl/ca/client.csr +18 -0
- package/tests/ssl/ca/client.key +27 -0
- package/tests/ssl/ca/gen-all-certs.sh +6 -0
- package/tests/ssl/ca/gen-client.sh +25 -0
- package/tests/ssl/ca/gen-localhost.sh +22 -0
- package/tests/ssl/ca/gen-server.sh +18 -0
- package/tests/ssl/ca/localhost.cnf +20 -0
- package/tests/ssl/ca/localhost.crt +20 -0
- package/tests/ssl/ca/localhost.csr +18 -0
- package/tests/ssl/ca/localhost.js +33 -0
- package/tests/ssl/ca/localhost.key +27 -0
- package/tests/ssl/ca/server.cnf +19 -0
- package/tests/ssl/ca/server.crt +25 -0
- package/tests/ssl/ca/server.csr +29 -0
- package/tests/ssl/ca/server.js +34 -0
- package/tests/ssl/ca/server.key +51 -0
- package/tests/ssl/npm-ca.crt +16 -0
- package/tests/ssl/test.crt +15 -0
- package/tests/ssl/test.key +15 -0
- package/tests/test-agent.js +102 -0
- package/tests/test-agentOptions.js +51 -0
- package/tests/test-api.js +33 -0
- package/tests/test-aws.js +123 -0
- package/tests/test-baseUrl.js +133 -0
- package/tests/test-basic-auth.js +221 -0
- package/tests/test-bearer-auth.js +187 -0
- package/tests/test-body.js +154 -0
- package/tests/test-cookies.js +130 -0
- package/tests/test-defaults.js +340 -0
- package/tests/test-digest-auth.js +232 -0
- package/tests/test-emptyBody.js +56 -0
- package/tests/test-errors.js +108 -0
- package/tests/test-event-forwarding.js +39 -0
- package/tests/test-follow-all-303.js +45 -0
- package/tests/test-follow-all.js +57 -0
- package/tests/test-form-data-error.js +85 -0
- package/tests/test-form-data.js +133 -0
- package/tests/test-form-urlencoded.js +73 -0
- package/tests/test-form.js +101 -0
- package/tests/test-gzip.js +296 -0
- package/tests/test-har.js +175 -0
- package/tests/test-hawk.js +187 -0
- package/tests/test-headers.js +305 -0
- package/tests/test-http-signature.js +110 -0
- package/tests/test-httpModule.js +112 -0
- package/tests/test-https.js +116 -0
- package/tests/test-isUrl.js +120 -0
- package/tests/test-json-request.js +117 -0
- package/tests/test-localAddress.js +49 -0
- package/tests/test-multipart-encoding.js +147 -0
- package/tests/test-multipart.js +129 -0
- package/tests/test-node-debug.js +95 -0
- package/tests/test-oauth.js +721 -0
- package/tests/test-onelineproxy.js +61 -0
- package/tests/test-option-reuse.js +54 -0
- package/tests/test-options-convenience-method.js +52 -0
- package/tests/test-params.js +101 -0
- package/tests/test-piped-redirect.js +55 -0
- package/tests/test-pipes.js +383 -0
- package/tests/test-pool.js +148 -0
- package/tests/test-promise.js +53 -0
- package/tests/test-proxy-connect.js +80 -0
- package/tests/test-proxy.js +304 -0
- package/tests/test-qs.js +135 -0
- package/tests/test-redirect-auth.js +131 -0
- package/tests/test-redirect-complex.js +93 -0
- package/tests/test-redirect.js +449 -0
- package/tests/test-rfc3986.js +106 -0
- package/tests/test-stream.js +36 -0
- package/tests/test-timeout.js +260 -0
- package/tests/test-timing.js +147 -0
- package/tests/test-toJSON.js +45 -0
- package/tests/test-tunnel.js +466 -0
- package/tests/test-unix.js +74 -0
- package/tests/unicycle.jpg +0 -0
- package/request.js +0 -1553
- package/src/ZlibTransform.js +0 -27
- package/src/caseless.js +0 -118
- package/src/index.js +0 -122
- package/src/request.js +0 -967
- package/src/utils.js +0 -274
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!---
|
|
2
|
+
BEFORE YOU SUBMIT please read the following:
|
|
3
|
+
|
|
4
|
+
Please search open/closed issues before submitting since someone might have asked the same thing before!
|
|
5
|
+
|
|
6
|
+
If you have a support request or question please submit them to one of this resources:
|
|
7
|
+
|
|
8
|
+
* Stack Overflow: http://stackoverflow.com/questions/tagged/request+node.js using the tags `node.js` & `request`
|
|
9
|
+
* Gitter community: https://gitter.im/request/request?utm_source=newissue
|
|
10
|
+
* Also have a look at the Readme for more information on how to get support:
|
|
11
|
+
https://github.com/request/request/blob/master/README.md
|
|
12
|
+
|
|
13
|
+
Issues on GitHub are only related to problems of request itself and we cannot answer
|
|
14
|
+
support questions here.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
### Summary
|
|
18
|
+
<!--- Provide a general summary of the issue in the title above -->
|
|
19
|
+
|
|
20
|
+
### Simplest Example to Reproduce
|
|
21
|
+
<!--- If describing a bug, tell us what request options we can use to reproduce the same bug/behavior -->
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
request({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
url: 'http://example.com', // a public URL that we can hit to reproduce, if possible
|
|
27
|
+
more: { 'options': 'here' }
|
|
28
|
+
},
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Expected Behavior
|
|
32
|
+
<!--- If you're describing a bug, tell us what should happen -->
|
|
33
|
+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
|
|
34
|
+
<!--- If request is handling requests/responses incorrectly, please include a link to the spec or documentation that supports that your expected behavior is correct. -->
|
|
35
|
+
|
|
36
|
+
### Current Behavior
|
|
37
|
+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
|
|
38
|
+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
|
|
39
|
+
|
|
40
|
+
### Possible Solution
|
|
41
|
+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
|
|
42
|
+
<!--- or ideas how to implement the addition or change -->
|
|
43
|
+
|
|
44
|
+
### Context
|
|
45
|
+
<!--- How has this issue affected you? What are you trying to accomplish? -->
|
|
46
|
+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
|
|
47
|
+
|
|
48
|
+
### Your Environment
|
|
49
|
+
<!--- Include as many relevant details about the environment you experienced the bug in -->
|
|
50
|
+
|
|
51
|
+
| software | version
|
|
52
|
+
| ---------------- | -------
|
|
53
|
+
| request |
|
|
54
|
+
| node |
|
|
55
|
+
| npm |
|
|
56
|
+
| Operating System |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## PR Checklist:
|
|
2
|
+
- [ ] I have run `npm test` locally and all tests are passing.
|
|
3
|
+
- [ ] I have added/updated tests for any new behavior.
|
|
4
|
+
<!-- Request is a complex project, there are VERY FEW exceptions
|
|
5
|
+
where a new test is not required for new behavior. -->
|
|
6
|
+
- [ ] If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]
|
|
7
|
+
<!-- If you'd like to suggest a significant change to request,
|
|
8
|
+
please create an issue to discuss those changes and gather
|
|
9
|
+
feedback BEFORE submitting your PR. -->
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## PR Description
|
|
13
|
+
<!-- Describe Your PR Here! -->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Number of days of inactivity before an issue becomes stale
|
|
2
|
+
daysUntilStale: 365
|
|
3
|
+
# Number of days of inactivity before a stale issue is closed
|
|
4
|
+
daysUntilClose: 7
|
|
5
|
+
# Issues with these labels will never be considered stale
|
|
6
|
+
exemptLabels:
|
|
7
|
+
- "Up for consideration"
|
|
8
|
+
- greenkeeper
|
|
9
|
+
- neverstale
|
|
10
|
+
- bug
|
|
11
|
+
# Label to use when marking an issue as stale
|
|
12
|
+
staleLabel: stale
|
|
13
|
+
# Comment to post when marking an issue as stale. Set to `false` to disable
|
|
14
|
+
markComment: >
|
|
15
|
+
This issue has been automatically marked as stale because it has not had
|
|
16
|
+
recent activity. It will be closed if no further activity occurs. Thank you
|
|
17
|
+
for your contributions.
|
|
18
|
+
# Comment to post when closing a stale issue. Set to `false` to disable
|
|
19
|
+
closeComment: false
|
package/.swcrc
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[{
|
|
2
|
+
"$schema": "https://json.schemastore.org/swcrc",
|
|
3
|
+
"test": "\\.(js|jsx|mjs|cjs)$",
|
|
4
|
+
"exclude": [".*\\.map$"],
|
|
5
|
+
"jsc": {
|
|
6
|
+
"parser": {
|
|
7
|
+
"syntax": "ecmascript", // "typescript"
|
|
8
|
+
"jsx": false,
|
|
9
|
+
"dynamicImport": false,
|
|
10
|
+
"privateMethod": true,
|
|
11
|
+
"functionBind": false,
|
|
12
|
+
"exportDefaultFrom": false,
|
|
13
|
+
"exportNamespaceFrom": false,
|
|
14
|
+
"decorators": true,
|
|
15
|
+
"decoratorsBeforeExport": false,
|
|
16
|
+
"topLevelAwait": false,
|
|
17
|
+
"importMeta": false
|
|
18
|
+
},
|
|
19
|
+
"transform": {
|
|
20
|
+
"decoratorVersion": "2022-03" // "2021-12" (default)
|
|
21
|
+
},
|
|
22
|
+
"target": "es2022", // es5,es6,es2020,es2021,es2022
|
|
23
|
+
"loose": true,
|
|
24
|
+
"externalHelpers": false,
|
|
25
|
+
"keepClassNames": true // 保留原始类名
|
|
26
|
+
},
|
|
27
|
+
"module": {
|
|
28
|
+
"type": "es6" // 输出模块类型 es6 commonjs
|
|
29
|
+
},
|
|
30
|
+
"minify": false, // 压缩代码
|
|
31
|
+
"sourceMaps": false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"$schema": "https://json.schemastore.org/swcrc",
|
|
35
|
+
"test": "\\.(ts|tsx)$",
|
|
36
|
+
"exclude": [".*\\.map$"],
|
|
37
|
+
"jsc": {
|
|
38
|
+
"parser": {
|
|
39
|
+
"syntax": "typescript",
|
|
40
|
+
"tsx": false,
|
|
41
|
+
"decorators": true,
|
|
42
|
+
"dynamicImport": false
|
|
43
|
+
},
|
|
44
|
+
"transform": {
|
|
45
|
+
"decoratorVersion": "2022-03"
|
|
46
|
+
},
|
|
47
|
+
"target": "es2022", // es5,es6,es2020,es2021,es2022
|
|
48
|
+
"loose": true,
|
|
49
|
+
"externalHelpers": false,
|
|
50
|
+
"keepClassNames": true // 保留原始类名
|
|
51
|
+
},
|
|
52
|
+
"module": {
|
|
53
|
+
"type": "es6" // 输出模块类型 es6 commonjs
|
|
54
|
+
},
|
|
55
|
+
"minify": false, // 压缩代码
|
|
56
|
+
"sourceMaps": false
|
|
57
|
+
}]
|
package/.travis.yml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
language: node_js
|
|
3
|
+
|
|
4
|
+
node_js:
|
|
5
|
+
- node
|
|
6
|
+
- 10
|
|
7
|
+
- 8
|
|
8
|
+
- 6
|
|
9
|
+
|
|
10
|
+
after_script:
|
|
11
|
+
- npm run test-cov
|
|
12
|
+
- codecov
|
|
13
|
+
- cat ./coverage/lcov.info | coveralls
|
|
14
|
+
|
|
15
|
+
webhooks:
|
|
16
|
+
urls: https://webhooks.gitter.im/e/237280ed4796c19cc626
|
|
17
|
+
on_success: change # options: [always|never|change] default: always
|
|
18
|
+
on_failure: always # options: [always|never|change] default: always
|
|
19
|
+
on_start: false # default: false
|
|
20
|
+
|
|
21
|
+
sudo: false
|