Class Response

java.lang.Object
nl.colorize.multimedialib.renderer.Response

public class Response extends Object
Representation of an HTTP response received after sending requests using Network.

MultimediaLib cannot use the standard HTTP client in java.net.http, as this is not yet available on all platforms supported by MultimediaLib.

See Also:
  • Constructor Details

    • Response

      public Response(int status, nl.colorize.util.stats.TupleList<String,String> headers, String body)
  • Method Details

    • getHeader

      public Optional<String> getHeader(String name)
      Returns the value of the header with the specified name. Since HTTP headers are case-insensitive, so is this method. Returns the first value if the header is present multiple times.
    • getHeaderValues

      public List<String> getHeaderValues(String name)
      Returns the values of the header with the specified name. Since HTTP headers are case-insensitive, so is this method.
    • getContentType

      public Optional<String> getContentType()
    • getStatus

      public int getStatus()
    • getHeaders

      public nl.colorize.util.stats.TupleList<String,String> getHeaders()
    • getBody

      public String getBody()