Class WebUtil.Response

java.lang.Object
com.sun.ts.lib.util.WebUtil.Response
Enclosing class:
WebUtil

public static class WebUtil.Response extends Object
Reponse object containing information returned from the web server
  • Field Details

    • versionToken

      public String versionToken
      Version (usually HTTP/1.0)
    • statusToken

      public String statusToken
      Status (e.g. 401)
    • location

      public String location
      Location (for redirections)
    • content

      public String content
      Actual page content
    • cookies

      public Hashtable cookies
      Storage for cookies
    • authenticationRequested

      public boolean authenticationRequested
      Flag; true if authentication requested
  • Constructor Details

    • Response

      public Response()
  • Method Details

    • parseCookie

      public void parseCookie(String cookieLine)
      Parses a header line for an old-style cookie (not Set-Cookie2), and stores the cookie in the cookies table. Only the key and value are stored. Expected syntax: "Set-Cookie: NAME=VALUE[;...]" The key is stored in upper-case.
      Parameters:
      cookieLine - The string with the cookie in it.
    • isError

      public boolean isError()
      Returns true if the status token for this response represents an error, or false if the status token indicates the page was retrieved okay. Note that a redirection is not an error.