Class PathDetails

java.lang.Object
com.renomad.minum.web.PathDetails

public final class PathDetails extends Object
Some essential characteristics of the path portion of the start line
  • Field Details

  • Constructor Details

    • PathDetails

      public PathDetails(String isolatedPath, String rawQueryString, Map<String,String> queryString)
      Basic constructor
      Parameters:
      isolatedPath - the isolated path is found after removing the query string
      rawQueryString - the raw query is the string after a question mark (if it exists - it's optional) if there is no query string, then we leave rawQuery as a null value
      queryString - the query is a map of the keys -> values found in the query string
  • Method Details

    • getIsolatedPath

      public String getIsolatedPath()
      Provides the path by itself, without the query string. For examples, here are some request lines with their isolated paths:
       
       request line                                isolated path
       -------------------                         -------------
       POST / HTTP/1.1                             ""
       GET /background.png HTTP/1.0                "background.png"
       HEAD /test.html?query=alibaba HTTP/1.1      "test.html"
       OPTIONS /anypage.html HTTP/1.0              "anypage.html"
       
       
    • getRawQueryString

      public String getRawQueryString()
      Returns the raw query string. For example, in "HEAD /test.html?query=alibaba HTTP/1.1", the raw query string is "query=alibaba"
    • getQueryString

      public Map<String,String> getQueryString()
      This returns the query string portion of the request line as a map, with case-sensitive keys.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object