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

Parameterized URLs in RestConnector #40

Closed
andrus opened this issue Oct 6, 2019 · 0 comments
Closed

Parameterized URLs in RestConnector #40

andrus opened this issue Oct 6, 2019 · 0 comments
Milestone

Comments

@andrus
Copy link
Contributor

andrus commented Oct 6, 2019

LM bundled URIConnector and the first version of RestConnector (#39) only allow working with static URLs. JAX-RS WebTarget on the other hand supports URL parameters, that can be substituted via various resolveTemplate methods. So let's take advantage of that and implement binding of extractor execution parameters to connector URL template.

Here is the API we are going to provide:

jerseyclient:
  targets:
    toextract:
      url: "http://127.0.0.1:8080/r1/{p1}?name={p2}"
LmTask task = ..
 Map<String, Object> params = RestConnector.bindTemplateValues()
                    .value("p1", 897L)
                    .value("p2", "a_Name")
                    .toExtractorParameters();
task.run(params);
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

1 participant