Class PseudoServlet

java.lang.Object
com.meterware.pseudoserver.PseudoServlet

public abstract class PseudoServlet extends Object
A basic simulated servlet for testing the HttpUnit library.
  • Field Details

  • Constructor Details

    • PseudoServlet

      public PseudoServlet()
  • Method Details

    • getResponse

      public WebResource getResponse(String methodType) throws IOException
      Returns a resource object as a result of a get request.
      Throws:
      IOException
    • getGetResponse

      public WebResource getGetResponse() throws IOException
      Returns a resource object as a result of a get request.
      Throws:
      IOException
    • getPostResponse

      public WebResource getPostResponse() throws IOException
      Throws:
      IOException
    • getPutResponse

      public WebResource getPutResponse() throws IOException
      Throws:
      IOException
    • getHeader

      protected String getHeader(String name)
      Returns the header with the specified name. If no such header exists, will return null.
    • getParameter

      protected String[] getParameter(String name)
      Returns the values for the parameter with the specified name. If no values exist will return null.
    • getReader

      protected Reader getReader()
      Returns a reader for the body of the request.
    • getBody

      protected byte[] getBody()
    • getRequest

      protected HttpRequest getRequest()