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

🚀 Feature: Add fetchOptions parameter to @novu/framework Client for enhanced flexibility in local development #7432

Open
2 tasks done
wh5938316 opened this issue Jan 5, 2025 · 1 comment · May be fixed by #7433
Open
2 tasks done
Labels

Comments

@wh5938316
Copy link

🔖 Feature description

I would like to request adding a new fetchOptions parameter to the Client in @novu/framework. This feature would allow developers to customize the fetch function’s behavior by passing additional options, such as an HTTP proxy agent.

🎤 Why is this feature needed ?

As a developer based in China, I often face issues with accessing Novu’s services due to the Great Firewall (GFW). This leads to timeouts when my local services attempt to send requests to Novu’s servers. Adding fetchOptions would allow me to use tools like https-proxy-agent to bypass these restrictions by routing requests through a proxy server.

✌️ How do you aim to achieve this?

Modify the Client in @novu/framework to accept an optional fetchOptions parameter. These options would be passed to the fetch function, enabling developers to provide custom configurations (e.g., proxy agents).

Here’s an example of how it might look:

import { Client as NovuClient } from "@novu/framework";
import httpsProxyAgent from 'https-proxy-agent';

const client = new NovuClient({
  apiKey: 'your-api-key',
  fetchOptions: {
    agent: new httpsProxyAgent('http://127.0.0.1:7890'), // Proxy for development
  },
});

🔄️ Additional Information

  • My local development environment consistently encounters timeouts when attempting to access Novu’s servers.
  • Implementing this feature would help developers in similar network-restricted regions and make Novu more globally accessible.

Thank you for considering this feature request! Please let me know if you need further details or would like assistance with testing or implementation.

👀 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant