Hi,
In order to use your library I need this feature. Let me throw idea on this post.
Structure like follow Topic
Goal : Passing simple parameters in the header for the request to the server.
Header structure.
How to inject
I prefer the second one because it gives more flexibility. We can add on the builder something like
java builder.addHeadersInjector(new HeaderInjector() { @Override Map<String, String> inject(String url) { return createMyHeaderForThisUrl(url); } })
When to call
Headers conflict
Feel free to comment or throw more ideas. Lucas.
@lucas34 this is a great plan! It should really be implemented this way. Can you make PR?
Also we must write tests to check
Also we should use empty implementation of HeaderInjector to avoid null checks.
HeaderInjector
lucas34 implementation is a good start point.
#20: allow to inject header from client side. TODO: tests are needed
#20: headers injector
I merged @lucas34 implementation to the master. Will be available in 2.8.0
2.8.0
Activity
lucas34 commentedon Sep 23, 2016
Hi,
In order to use your library I need this feature.
Let me throw idea on this post.
Structure like follow
Topic
Goal : Passing simple parameters in the header for the request to the server.
Header structure.
How to inject
I prefer the second one because it gives more flexibility.
We can add on the builder something like
java builder.addHeadersInjector(new HeaderInjector() { @Override Map<String, String> inject(String url) { return createMyHeaderForThisUrl(url); } })When to call
Headers conflict
Feel free to comment or throw more ideas.
Lucas.
danikula commentedon Oct 11, 2016
@lucas34 this is a great plan! It should really be implemented this way. Can you make PR?
danikula commentedon Oct 11, 2016
Also we must write tests to check
Also we should use empty implementation of
HeaderInjectorto avoid null checks.danikula commentedon Apr 26, 2017
lucas34 implementation is a good start point.
#20: allow to inject header from client side. TODO: tests are needed
#20: headers injector
danikula commentedon May 18, 2017
I merged @lucas34 implementation to the master. Will be available in
2.8.0