Package com.meterware.pseudoserver

# 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 Summary

Fields
Modifier and Type
Field
Description
`static final String`
`CONTENTS`

## Constructor Summary

Constructors
Constructor
Description
`PseudoServlet()`

## Method Summary

Modifier and Type
Method
Description
`protected byte[]`
`getBody()`
`WebResource`
`getGetResponse()`
Returns a resource object as a result of a get request.
`protected String`
`getHeader(String name)`
Returns the header with the specified name.
`protected String[]`
`getParameter(String name)`
Returns the values for the parameter with the specified name.
`WebResource`
`getPostResponse()`
`WebResource`
`getPutResponse()`
`protected Reader`
`getReader()`
Returns a reader for the body of the request.
`protected HttpRequest`
`getRequest()`
`WebResource`
`getResponse(String methodType)`
Returns a resource object as a result of a get request.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### CONTENTS

public static final String CONTENTS

See Also:
  - Constant Field Values

## 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()