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.
Streaming HTTP messages
Rename streaming HTTP message objects as follows:
HttpRequest
toLiveHttpRequest
HttpResponse
toLiveHttpResponse
Rationale:
Our observation is that plugin developers don't always understand that
HttpRequest
andHttpResponse
objects represent live traffic that is being streamed through styx interceptors. Sometimes we see these classes being incorrectly used as if they contain the headers and the message body in full in one immutable.We hope that the
Live
prefix helps to emphasise the true nature of these classes and to proactively avoid innocent mistakes due to misunderstanding.Full HTTP Messages
Rename "full" HTTP messages as follows:
FullHttpRequest
toHttpRequest
FullHttpResponse
toHttpResponse
Rationale:
These classes are immutable HTTP message objects that contain HTTP headers and a body in one package. They are more convenient and useful for many use cases outside of Styx HTTP interceptors. We want to make Styx as an useful HTTP library for other applications apart from proxying, and therefore provide a shorter and more concise name for the classes we believe are used more often.
Conversion Routines
Rename conversion routines as follows:
toFullRequest
toaggregate
toFullResponse
toaggregate
toStreamingRequest
tostream
toStreamingResponse
tostream
Rationale:
These are shorter and more concise but equally meaningful names. Also they are a better fit with the new HTTP message class names. Also, the method name for both requests and responses will be the same.