Class HTTPHandler

java.lang.Object
septogeddon.pluginquery.http.HTTPHandler

public class HTTPHandler extends Object
Utilities for PluginQuery HTTP Handler
  • Constructor Details

    • HTTPHandler

      public HTTPHandler()
  • Method Details

    • setParser

      public static void setParser(String headerName, Function<Object,HTTPHeader> factory)
      Set a parser for specific header
      Parameters:
      headerName - the header name, null for global (all headers)
      factory - the HTTPHeader factory
    • setParser

      public static void setParser(String headerName, BiFunction<String,Object,HTTPHeader> factory)
      Set a parser for specific header
      Parameters:
      headerName - the header name, null for global (all headers)
      factory - the HTTPHeader factory
    • parseHeader

      public static HTTPHeader parseHeader(String headerName, Object rawValue)
      Parse header raw value into HTTPHeader
      Parameters:
      headerName - the header name
      rawValue - the header value
      Returns:
      parsed HTTPHeader