30 Commits

Author SHA1 Message Date
fengmk2
e4f7069904
feat: use urllib@4.5.0 (#5371)
auto fallback to urllib@3 when require urllib4 error

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Expanded CI workflow to include Node.js version 23 for testing.
- Enhanced `HttpClientNext` class with improved error handling and
configuration management.
- Added support for HTTP/2 functionality in the test suite, including
self-signed certificate handling.

- **Bug Fixes**
- Improved error handling for library imports based on Node.js versions.

- **Chores**
	- Updated dependency versions in `package.json`. 
- Modified HTTP client configuration to include a new `connect`
property.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-30 21:35:55 +08:00
fengmk2
46d3fb222b
feat: support allowH2 on urllib@4 (#5357)
https://github.com/eggjs/egg/issues/5347
2024-09-16 12:20:03 +08:00
killa
68cbd241e2
feat: impl httpclient.safeCurl (#5339)
Co-authored-by: fengmk2 <suqian.yf@antgroup.com>
2024-07-12 00:32:47 +08:00
fengmk2
ceded0b1c9
feat: allow to httpClient use HTTP2 first (#5332)
base on https://github.com/node-modules/urllib/pull/516


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced the ability to enable HTTP/2 support through the `allowH2`
property when using the next-generation HTTP client.
  
- **Bug Fixes**
- Enhanced clarity and accuracy of comments for HTTP client
configuration properties.

- **Improvements**
- Updated `urllib-next` dependency to version `^3.26.0` for better
performance and stability.
- Added tests to verify HTTP/2 functionality and custom HTTP client
behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-27 10:17:46 +08:00
fengmk2
a6ebe0f49a
feat: app.httpClient alias to app.httpclient (#5304)
let `@Inject() httpClient` work

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a new alias for `httpClient` to improve accessibility and
usage within the application.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-04-12 14:23:53 +08:00
William.Tung
c5ff0d1fde
test: fix getting "httpClient" instance before "app" is ready (#5199)
The 'httpclient-tracer' unit test cannot work properly, because "app" hasn't been initialized, we'll get an error when getting "httpclient".
The solution is to get it in "beforeStart" in the app.js to have a test with.
2023-06-05 13:57:49 +08:00
fengmk2
610a39e7f4
👌 IMPROVE: Drop httpclient callback and thunk style (#5052)
And remove mz and mz-modules deps
2022-10-31 09:57:50 +08:00
fengmk2
7ee19e8402
🐛 FIX: Allow override HttpClientNext (#5037)
https://github.com/eggjs/egg/pull/5000
2022-09-28 23:00:30 +08:00
fengmk2
2ffb37ab59
feat: Support urllib@3 (#5000)
closes https://github.com/eggjs/egg/issues/4847
2022-08-28 08:45:46 +08:00
fengmk2
ff1850f662
Release 3.0.0 (#4999)
closes https://github.com/eggjs/egg/issues/4998
2022-08-22 12:35:30 +08:00
fengmk2
f97fe4a8c8
test: change error code assert (#4907) 2022-03-16 11:42:25 +08:00
fengmk2
189c478048
feat: handle ENETUNREACH error on httpclient (#4792) 2021-11-10 18:00:32 +08:00
Suyi
6dc8a2d145 chore: fix ci (#3825)
* chore: fix ci

* test: skip trigger & httpclient request tracer with app-ready
2019-07-17 14:15:04 +08:00
TZ | 天猪
e7fbd68f32
feat: switch httpclient to httpclient2 for retry feature (#3626) 2019-04-16 16:57:46 +08:00
Yiyu He
89872a76fc
Revert "feat: switch httpclient to httpclient2 for retry feature (#36… (#3622) 2019-04-12 15:25:46 +08:00
TZ | 天猪
eead318625 feat: switch httpclient to httpclient2 for retry feature (#3606) 2019-04-11 17:21:52 +08:00
fengmk2
327fa174ff fix: allow request timeout bigger than agent timeout (#3146) 2018-11-12 00:18:11 +08:00
Maledong
92181e83f9 doc (CONTRIBUTION): Add missing English translations and clearify dns (#3035) 2018-10-11 10:34:48 +08:00
Haoliang Gao
aaf8faf4fd
test: skip test (#2773)
It's introduced by https://github.com/node-modules/urllib/pull/288
2018-07-06 20:49:01 +08:00
Khaidi Chu
ba708ca4e9 feat: support customized client error (#2283)
Add `onClientError` configuration to customize handling client error and get
`rawPacket`.

Connect timeout for 5000ms, GET https://eggjs.org/ for several times
2018-04-09 16:27:43 +08:00
fengmk2
503b69b2e5 feat: dump application router json
Store on `run/router.json`
2017-11-29 15:06:07 +08:00
Yiyu He
12edd64915
test: use async function instead of generator function (#1684) 2017-11-20 17:42:35 +08:00
TZ | 天猪
6846badc8d docs: add plugin.js description (#1499) 2017-10-10 21:23:35 -05:00
hui
6eac07eb28 refactor: httpclient args tracer to be enforced (#1421) 2017-09-15 19:28:15 +08:00
hui
f7c0d85209 feat: support app.httpclient and agent.httpclient auto set tracer (#1393) 2017-09-10 11:41:34 +08:00
Haoliang Gao
e9f93cf83d refactor: export app.HttpClient that can be overwritten (#1234) 2017-07-26 17:36:49 +08:00
fengmk2
988b8c84d0 fix: make sure config.httpclient.httpAgent.timeout >= 30000 (#1165)
distinguish options: request, httpAgent and httpsAgent on httpclient
2017-07-19 10:05:50 +08:00
Haoliang Gao
1a027ad727 test: use assert instead of should (#837) 2017-05-03 22:37:51 +08:00
fengmk2
b28ce766fa test: disable error log to stderr (#453) 2017-02-25 22:07:55 +08:00
fengmk2
06295b833d docs: add core/httpclient document (#197) 2017-01-09 18:30:26 +08:00