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

Rename streaming messages #314

Merged

Conversation

mikkokar
Copy link
Contributor

Streaming HTTP messages

Rename streaming HTTP message objects as follows:

HttpRequest to LiveHttpRequest
HttpResponse to LiveHttpResponse

Rationale:

Our observation is that plugin developers don't always understand that HttpRequest and HttpResponse 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 to HttpRequest
FullHttpResponse to HttpResponse

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 to aggregate
toFullResponse to aggregate
toStreamingRequest to stream
toStreamingResponse to stream

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.

@mikkokar mikkokar requested review from kvosper, dvlato and VivianLopes and removed request for kvosper October 18, 2018 08:38
@mikkokar mikkokar merged commit d138473 into ExpediaGroup:feature-styx-1.0-api Oct 18, 2018
@mikkokar mikkokar deleted the rename-streaming-messages branch October 18, 2018 10:00
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

Successfully merging this pull request may close these issues.

2 participants