net.officefloor.plugin.socket.server.http
Class HttpTestUtil

java.lang.Object
  extended by net.officefloor.plugin.socket.server.http.HttpTestUtil

public class HttpTestUtil
extends Object

Utility class aiding in testing HTTP functionality.

Author:
Daniel Sagenschneider

Method Summary
static HttpRequest createHttpRequest(String method, String requestUri, String body, String... headerNameValues)
          Creates a HttpRequest for testing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createHttpRequest

public static HttpRequest createHttpRequest(String method,
                                            String requestUri,
                                            String body,
                                            String... headerNameValues)
                                     throws Exception
Creates a HttpRequest for testing.

Parameters:
method - HTTP method (GET, POST).
requestUri - Request URI.
body - Contents of the HttpRequest body.
headerNameValues - HttpHeader name values.
Returns:
HttpRequest.
Throws:
Exception


Copyright © 2005-2011. All Rights Reserved.