Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix undefined search params of get method #436

Closed
wants to merge 2 commits into from

Conversation

linrf
Copy link

@linrf linrf commented Feb 23, 2023

fix this
image

@@ -405,9 +406,10 @@ export class HttpClient extends EventEmitter {
|| isReadable(args.data);
if (isGETOrHEAD) {
if (!isStringOrBufferOrReadable) {
for (const field in args.data) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只过滤 undefined 吧,其他还是按照 URL SearchParams 默认逻辑来, querystring 模块不是标准的规范。

@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #436 (6df18eb) into master (bda2231) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #436   +/-   ##
=======================================
  Coverage   99.67%   99.67%           
=======================================
  Files           8        8           
  Lines        1222     1224    +2     
  Branches      233      233           
=======================================
+ Hits         1218     1220    +2     
  Misses          4        4           
Impacted Files Coverage Δ
src/HttpClient.ts 99.83% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fengmk2
Copy link
Member

fengmk2 commented Mar 25, 2023

还是保持 URL SearchParams 的逻辑

@fengmk2
Copy link
Member

fengmk2 commented Mar 25, 2023

#441

fengmk2 added a commit that referenced this pull request Mar 25, 2023
fengmk2 added a commit that referenced this pull request Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants