-
Notifications
You must be signed in to change notification settings - Fork 5.5k
[FEATURE] @pipedream/platform axios should support the ability to create custom axios constructor, or pass all standard axios options #5497 #5544
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hello @lcaresia @andrewjschuang, would you mind advice how can I test this? Or is this needed testing? |
@vunguyenhung I think you can create two instances of each import axios from "axios";
import { axios as pipedreamAxios } from "./platform/dist/index.js"; or something like that. And then create a config to pass in to the constructor with most or all |
Hello @andrewjschuang, I couldn't test the action due to an error on the publish action step. Could you check the test report below and advice how can I test it? |
Hi @lcaresia, looking at the code, seems like the change doesn't reflect in anything in practice, since we don't remove any key from the Also, looking at the thread that originated this issue, I think it's if best we implemente the axios.create() method. I also thought of adding a flag |
You can test creating an
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lcaresia!
I've left some comments about some important improvements, but overall this is in the right track!
Btw, here is an example of what I mentioned in a comment below
function axios(config) {
axios.create = (config) => console.log("Created axios instance with config:", config);
console.log("Called axios with config:", config);
}
> axios({ method:"post" })
Called axios with config: { method: 'post' }
> axios.create({ baseUrl: "https://api.axios.com" })
Created axios instance with config: { baseUrl: 'https://api.axios.com' }
Co-authored-by: Andrew Chuang <[email protected]>
No description provided.