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

Include router url in request body #98

Open
answerquest opened this issue Aug 22, 2023 · 1 comment
Open

Include router url in request body #98

answerquest opened this issue Aug 22, 2023 · 1 comment

Comments

@answerquest
Copy link

Hi, thanks a lot for making this really efficient API wrapper around Vroom .

I have multiple routers setup for multiple regions and use cases, and want to be able to use the same vroom-docker / vroom-express instance, by sending in the host and port of the router in my api request.

I've gone through the source code (just 2 files, thank heavens!) and I'm thinking this is how we can do it:

  • check the request body for router's host and port
  • if present, then apply it in the options in the same place we're currently picking them from the config.yml, overriding the latter
  • remove them from the request body json so that they're no longer in that text that needs to be sent to vroom as input

I reckon something similar is already being done with "options" (g, c etc).

How does this sound?

@jcoupey
Copy link
Contributor

jcoupey commented Aug 22, 2023

What you want to do is basically to override the default host/port config so this is indeed very similar to what is provided for other flags via the options object.

If you simply replicate the way it's done for other options, you could add support for -a and -p flags in options.a and options.p respectively, which would be enough. Happy to review a PR for such a change.

@jcoupey jcoupey changed the title Feature request: include router url in request body Include router url in request body Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants