Streamline Styx HTTP Client interfaces #282
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Streamline Styx HTTP Client interfaces so that they can be published together with 1.0 API.
To sum up the changes:
The main HTTP client interfaces are moved into the
com.hotels.styx.client
package.The
StyxHttpClient
has been renamed toStyxBackendServiceClient
. This is more descriptive, and it frees the more succinctStyxHttpClient
to the more commonly usedFullHttpClient
.The
FullHttpClient
interface is renamed toHttpClient
which in the next iteration will be receiving a fluent interface to deal with both full and streaming HTTP requests, and to adjust contextual attributes per request basis.Note that there is no need
StyxBackendServiceClient
needs to implement any particular interface. TheBackendServiceClient
interface remains for now to simplify mocking in our unit tests.What do you think?
Does this renaming go too far or are there simpler approaches?