Class WarcRequest


public class WarcRequest extends WarcCaptureRecord
  • Method Details

    • http

      public HttpRequest http() throws IOException
      Parses the content body of this record as HTTP request.

      This is a convenience method for HttpRequest.parse(request.body()).

      Throws:
      IOException
    • payloadType

      public MediaType payloadType() throws IOException
      Description copied from class: WarcCaptureRecord
      Content-Type of the payload.
      Overrides:
      payloadType in class WarcCaptureRecord
      Throws:
      IOException
    • payload

      public Optional<WarcPayload> payload() throws IOException
      Description copied from class: WarcTargetRecord
      Returns the payload of this record if one is present.

      This method returns an empty optional when the payload is undefined for this record type or if this library does not know how to parse the body in order to extract the payload. If the payload is well defined but happens to be zero bytes in length this method still returns a WarcPayload object.

      Overrides:
      payload in class WarcTargetRecord
      Throws:
      IOException