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

feat: http-proxy 转发时 支持 axios的所有参数 #2565

Closed
wants to merge 1 commit into from

Conversation

huangapple
Copy link
Contributor

@czy88840616
Copy link
Member

麻烦补充单测。

@huangapple
Copy link
Contributor Author

哦哦, 好的。
有个问题问一下, 我在 http-proxy目录下跑 npm test时报错了, 哪边有相关单测指导 ?
image

@czy88840616
Copy link
Member

在根目录 npm i & npm run bootstrap & npm run build 之后,再进子目录 npm run test

@huangapple
Copy link
Contributor Author

npm run build 失败了
image

@czy88840616
Copy link
Member

可能要自行处理下命令,框架的研发本身没有对 windows做支持。

@huangapple
Copy link
Contributor Author

很神奇, 我在ubuntu下执行 npm run build 报的

不过我直接把命令复制出来就没报错了

@huangapple
Copy link
Contributor Author

huangapple commented Dec 8, 2022

我把修改还原了, 在http-proxy执行 npm test也失败了
image

在上面的grpc倒是全通过了, 是有什么要注意的吗?

@czy88840616
Copy link
Member

你可以把单测加了在环境跑。

@huangapple
Copy link
Contributor Author

huangapple commented Dec 8, 2022

看这个报错有什么窍门吗?我搜索我新加的 两个案例 get can redirect host , get no redirect host 都搜索不到。
@czy88840616

@@ -1,6 +1,7 @@
import { Configuration, Provide, ServerlessTrigger, ServerlessTriggerType } from '@midwayjs/core';
import * as faas from '@midwayjs/faas';
import * as proxy from '../../../../src';
import https from "https";
Copy link
Member

Choose a reason for hiding this comment

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

  • as 把

@@ -1,6 +1,7 @@
import { Configuration } from '@midwayjs/core';
import * as koa from '@midwayjs/koa';
import * as proxy from '../../../../src';
import https from "https";
Copy link
Member

Choose a reason for hiding this comment

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

同理

@czy88840616
Copy link
Member

现在是proxy的报错了。
image

@huangapple huangapple force-pushed the feat_http-proxy branch 2 times, most recently from 1220a1b to 4f7810a Compare December 8, 2022 14:00
@huangapple
Copy link
Contributor Author

@czy88840616 辛苦抽空指导下, 单测有点没搞懂。

@czy88840616
Copy link
Member

尽量本地跑吧,cd packages/http-proxy & npm run test

@huangapple
Copy link
Contributor Author

哪天有空再研究下吧

@huangapple huangapple closed this Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants