Home / Function/ HttpResponse() — netty Function Reference

HttpResponse() — netty Function Reference

Architecture documentation for the HttpResponse() function in HttpConversionUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  83a0b8c3_93ae_5f1e_df15_907f321755f6["HttpResponse()"]
  0560b510_c1dc_0a46_6dca_e5dbfb67d807["HttpConversionUtil"]
  83a0b8c3_93ae_5f1e_df15_907f321755f6 -->|defined in| 0560b510_c1dc_0a46_6dca_e5dbfb67d807
  f883ee49_b387_2383_d1d6_1d09b3c40688["addHttp2ToHttpHeaders()"]
  83a0b8c3_93ae_5f1e_df15_907f321755f6 -->|calls| f883ee49_b387_2383_d1d6_1d09b3c40688
  style 83a0b8c3_93ae_5f1e_df15_907f321755f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java lines 356–371

    public static HttpResponse toHttpResponse(final int streamId,
                                              final Http2Headers http2Headers,
                                              final boolean validateHttpHeaders) throws Http2Exception {
        final HttpResponseStatus status = parseStatus(http2Headers.status());
        // HTTP/2 does not define a way to carry the version or reason phrase that is included in an
        // HTTP/1.1 status line.
        final HttpResponse msg = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status, validateHttpHeaders);
        try {
            addHttp2ToHttpHeaders(streamId, http2Headers, msg.headers(), msg.protocolVersion(), false, false);
        } catch (final Http2Exception e) {
            throw e;
        } catch (final Throwable t) {
            throw streamError(streamId, PROTOCOL_ERROR, t, "HTTP/2 to HTTP/1.x headers conversion error");
        }
        return msg;
    }

Domain

Subdomains

Frequently Asked Questions

What does HttpResponse() do?
HttpResponse() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java.
Where is HttpResponse() defined?
HttpResponse() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/HttpConversionUtil.java at line 356.
What does HttpResponse() call?
HttpResponse() calls 1 function(s): addHttp2ToHttpHeaders.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free