Package snap.web

Class WebRequest

java.lang.Object
snap.web.WebRequest

public class WebRequest extends Object
A request to a server.
  • Constructor Details

    • WebRequest

      public WebRequest()
      Constructor.
    • WebRequest

      public WebRequest(WebURL aURL)
      Constructor for given URL.
    • WebRequest

      public WebRequest(WebFile aFile)
      Constructor for given file.
  • Method Details

    • getSite

      public WebSite getSite()
      Returns the site for the request.
    • getURL

      public WebURL getURL()
      Returns the URL.
    • getFile

      public WebFile getFile()
      Returns the File if previously set or cached in site.
    • getFilePath

      public String getFilePath()
      Returns the file path of request URL.
    • isFileDir

      public boolean isFileDir()
      Returns whether a request file is directory (only valid if request was created from file).
    • getType

      public WebRequest.Type getType()
      Returns the type of request.
    • setType

      public void setType(WebRequest.Type aType)
      Sets the type of request.
    • getSendBytes

      public byte[] getSendBytes()
      Returns the post bytes.
    • setSendBytes

      public void setSendBytes(byte[] theBytes)
      Sets the bytes to send.
    • setPostBytes

      public void setPostBytes(byte[] theBytes)
      Sets the bytes to POST.
    • setPutBytes

      public void setPutBytes(byte[] theBytes)
      Sets the bytes to PUT.
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object