Class Http1StatusParser

java.lang.Object
io.helidon.webclient.http1.Http1StatusParser

public final class Http1StatusParser extends Object
Parser of HTTP/1.0 or HTTP/1.1 response status.
  • Method Details

    • readStatus

      public static Status readStatus(io.helidon.common.buffers.DataReader reader, int maxLength)
      Read the status line from HTTP/1.0 or HTTP/1.1 response.
      Parameters:
      reader - data reader to obtain bytes from
      maxLength - maximal number of bytes that can be processed before end of line is reached
      Returns:
      parsed HTTP status
      Throws:
      IllegalStateException - in case of unexpected data
      io.helidon.common.buffers.DataReader.InsufficientDataAvailableException - when not enough data can be obtained
      io.helidon.common.buffers.DataReader.IncorrectNewLineException - in case we are missing correct end of line (CRLF)
      RuntimeException - additional exceptions may be thrown from the reader, depending on its implementation