Interface RawHttpCodec

All Known Implementing Classes:
DefaultRawHttpCodec

public interface RawHttpCodec
Interface for encoding and decoding HttpBEntity objects to and from their raw string representation according to the RFC standards.
See Also:
  • Method Details

    • encode

      String encode(HttpBRequest request)
      Encodes the given HttpBRequest object into its String representation according to the RFC standards. This encoded HTTP request can then be used for logging purposes, transmission over HTTP/VAU or any other use case where an encoded HTTP request is needed.
      Parameters:
      request - the HttpBRequest object holding the internal data of the HTTP request
      Returns:
      the encoded HTTP request as a plain string representation
    • encode

      String encode(HttpBResponse response)
      Encodes the given HttpBResponse object into its String representation according to the RFC standards. This encoded HTTP response can then be used for logging purposes, transmission over HTTP/VAU or any other use case where an encoded HTTP response is needed.
      Parameters:
      response - the HttpBResponse object holding the internal data of the HTTP response
      Returns:
      the encoded HTTP response as a plain string representation
    • encodeB64

      default String encodeB64(HttpBRequest request)
      Encodes the given HttpBRequest object into its Base64 encoded String representation
      Parameters:
      request - the HttpBRequest object holding the internal data of the HTTP request
      Returns:
      the encoded HTTP request as a Base64 encoded string representation
    • encodeB64

      default String encodeB64(HttpBResponse response)
      Encodes the given HttpBResponse object into its Base64 encoded String representation
      Parameters:
      response - the HttpBResponse object holding the internal data of the HTTP response
      Returns:
      the encoded HTTP response as a Base64 encoded string representation
    • decodeResponse

      HttpBResponse decodeResponse(String rawResponse)
      Decodes a raw HTTP response string into an HttpBResponse object.
      Parameters:
      rawResponse - the raw HTTP response string
      Returns:
      the decoded HttpBResponse object
    • decodeResponse

      default HttpBResponse decodeResponse(byte[] rawResponse)
      Decodes a raw HTTP response byte array into an HttpBResponse object.
      Parameters:
      rawResponse - the raw HTTP response byte array
      Returns:
      the decoded HttpBResponse object
    • decodeResponseB64

      default HttpBResponse decodeResponseB64(String b64RawResponse)
      Decodes a Base64 encoded HTTP response string into an HttpBResponse object.
      Parameters:
      b64RawResponse - the Base64 encoded HTTP response string
      Returns:
      the decoded HttpBResponse object
    • decodeRequest

      HttpBRequest decodeRequest(String rawRequest)
    • decodeRequest

      default HttpBRequest decodeRequest(byte[] rawRequest)
    • decodeRequestB64

      default HttpBRequest decodeRequestB64(String b64RawRequest)
    • defaultCodec

      static RawHttpCodec defaultCodec()
      Provides the default implementation of the RawHttpCodec interface.
      Returns:
      the default RawHttpCodec implementation