Class DefaultH2ResponseConverter

java.lang.Object
org.apache.hc.core5.http2.impl.DefaultH2ResponseConverter
All Implemented Interfaces:
H2MessageConverter<org.apache.hc.core5.http.HttpResponse>

public class DefaultH2ResponseConverter extends Object implements H2MessageConverter<org.apache.hc.core5.http.HttpResponse>
HTTP/2 response converter.
Since:
5.0
  • Field Details

  • Constructor Details

    • DefaultH2ResponseConverter

      public DefaultH2ResponseConverter()
  • Method Details

    • convert

      public org.apache.hc.core5.http.HttpResponse convert(List<org.apache.hc.core5.http.Header> headers) throws org.apache.hc.core5.http.HttpException
      Description copied from interface: H2MessageConverter
      Converts given list of HTTP/2 headers to a HttpMessage.
      Specified by:
      convert in interface H2MessageConverter<org.apache.hc.core5.http.HttpResponse>
      Parameters:
      headers - list of HTTP/2 headers
      Returns:
      HTTP message
      Throws:
      org.apache.hc.core5.http.HttpException - in case of HTTP protocol violation
    • convert

      public List<org.apache.hc.core5.http.Header> convert(org.apache.hc.core5.http.HttpResponse message) throws org.apache.hc.core5.http.HttpException
      Description copied from interface: H2MessageConverter
      Converts given HttpMessage to a list of HTTP/2 headers.
      Specified by:
      convert in interface H2MessageConverter<org.apache.hc.core5.http.HttpResponse>
      Parameters:
      message - HTTP message
      Returns:
      list of HTTP/2 headers
      Throws:
      org.apache.hc.core5.http.HttpException - in case of HTTP protocol violation