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

Allow backend host and Port configurable #31

Open
avilatusell opened this issue Jan 19, 2017 · 4 comments
Open

Allow backend host and Port configurable #31

avilatusell opened this issue Jan 19, 2017 · 4 comments
Assignees

Comments

@avilatusell
Copy link
Contributor

The default_host = "su1.3scale.net".
To work with on-prem version, the host and the port would need to be configurable.

@EricWittmann
Copy link
Collaborator

This appears to already be supported by the ServiceApiDriver class. The following constructors exist:

ServiceApiDriver()
ServiceApiDriver(String::provider_key)
ServiceApiDriver(String::provider_key, boolean::useHttps)
ServiceApiDriver(String::provider_key, String::host)
ServiceApiDriver(String::provider_key, String::host, boolean::useHttps)

The last two variants allow a custom host to be used (rather than the default which is su1.3scale.net. The port can be passed in as part of the host. For example, you could do this:

ServiceApiDriver driver = new ServiceApiDriver(KEY, "myserver.foo.com:8080");

Or if you were using https on a custom port you could do this:

ServiceApiDriver driver = new ServiceApiDriver(KEY, "myserver.foo.com:8443", true);

This isn't great, admittedly. The code just creates a string and then uses that to create a URL, which isn't the best way to connect to a server, but it DOES work.

I could update the documentation (readme) if that's helpful. Or if major improvements to this code are desired, I could spend some time bettering it. :)

@avilatusell
Copy link
Contributor Author

@EricWittmann Thank you very much! yes, a major improvement would be needed. It would be very helpful if you had some time for bettering it :-)
We can take care of the documentation.

@EricWittmann
Copy link
Collaborator

EricWittmann commented Jan 25, 2017

OK I'll leave the documentation to you, then. :) I'll hold off any any significant changes for later, and only focus on minimal changes required for this upcoming on-prem release. We should save any breaking changes I might make for a new major version of the plugin.

So I consider this Issue as "done" from a coding perspective. But perhaps it should remain open and assigned to @avilatusell until the docs are updated?

@avilatusell
Copy link
Contributor Author

OK, thanks! @EricWittmann

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

No branches or pull requests

3 participants