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

Added URL Argument to Call method #239

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

FeezyHendrix
Copy link

Problem:
The current call method is limited to using a fixed base URL. It does not support sending requests to a different hostname or port, which restricts its flexibility in multi-environment or distributed system setups.

Solution:
This update introduces the url key as an optional parameter in the call method. When provided, the process constructs the request URL using the specified hostname and port. If the URL key is omitted, the method defaults to the existing base URL.

Usage Example:

call('example.method', {
  url: 'http://localhost:3001'
});

This resolves the request to:

http://localhost:3001/api/method/example.method

Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for frappeui ready!

Name Link
🔨 Latest commit 00153c3
🔍 Latest deploy log https://app.netlify.com/sites/frappeui/deploys/675c06b53d3ea00008ac44f1
😎 Deploy Preview https://deploy-preview-239--frappeui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant