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

Add utility class which contains methods which helps to convert HTTP1… #82

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

normanmaurer
Copy link
Member

…/x to BHTTP messages.

Motivation:

Often people need to translate from HTTP1/x to BHTTP, we should provide utilities for this.

Modifications:

Add BinaryHttpConvert class which contain various static helper methods

Result:

Easily be able to convert from HTTP1/x to BHTTP.

…/x to BHTTP messages.

Motivation:

Often people need to translate from HTTP1/x to BHTTP, we should provide utilities for this.

Modifications:

Add BinaryHttpConvert class which contain various static helper methods

Result:

Easily be able to convert from HTTP1/x to BHTTP.
@normanmaurer normanmaurer added this to the 0.0.14.Final milestone Aug 6, 2024
@normanmaurer normanmaurer merged commit 64ef517 into main Aug 6, 2024
9 checks passed
@normanmaurer normanmaurer deleted the converter branch August 6, 2024 23:49
Copy link
Collaborator

@thomdev thomdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

/**
* Creates a {@link FullBinaryHttpResponse} from the given {@link FullHttpRequest}.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{@link FullHttpRequest} -> {@link FullHttpResponse}

* @return the created response.
*/
public static BinaryHttpResponse convert(HttpResponse response) {
if (response instanceof FullBinaryHttpRequest) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FullHttpResponse

* @return the created request.
*/
public static BinaryHttpRequest convert(HttpRequest request, String scheme, String authority) {
if (request instanceof FullBinaryHttpRequest) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FullHttpRequest

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.

3 participants