rewrite-test-harness 1.0.5.Final

org.ocpsoft.rewrite.test
Class HttpAction<T extends org.apache.http.HttpRequest>

java.lang.Object
  extended by org.ocpsoft.rewrite.test.HttpAction<T>

public class HttpAction<T extends org.apache.http.HttpRequest>
extends Object

Author:
Lincoln Baxter, III

Constructor Summary
HttpAction(org.apache.http.client.HttpClient client, org.apache.http.protocol.HttpContext context, T request, org.apache.http.HttpResponse response, String baseUrl, String contextPath)
           
 
Method Summary
 org.apache.http.client.HttpClient getClient()
           
 org.apache.http.protocol.HttpContext getContext()
           
 String getContextPath()
           
 String getCurrentContextRelativeURL()
          Return the current URL excluding host or context root.
 String getCurrentURL()
          Return the current full URL.
 String getHost()
          Return the URL up to and including the host and port.
 T getRequest()
           
 org.apache.http.HttpResponse getResponse()
           
 String getResponseContent()
           
 List<String> getResponseHeaderValues(String name)
           
 int getStatusCode()
           
static String toString(InputStream stream)
          Return a String containing the contents of the given InputStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpAction

public HttpAction(org.apache.http.client.HttpClient client,
                  org.apache.http.protocol.HttpContext context,
                  T request,
                  org.apache.http.HttpResponse response,
                  String baseUrl,
                  String contextPath)
Method Detail

getCurrentURL

public String getCurrentURL()
Return the current full URL.


getCurrentContextRelativeURL

public String getCurrentContextRelativeURL()
Return the current URL excluding host or context root.


getHost

public String getHost()
Return the URL up to and including the host and port.


getClient

public org.apache.http.client.HttpClient getClient()

getRequest

public T getRequest()

getContext

public org.apache.http.protocol.HttpContext getContext()

getResponse

public org.apache.http.HttpResponse getResponse()

getContextPath

public String getContextPath()

getResponseHeaderValues

public List<String> getResponseHeaderValues(String name)

getStatusCode

public int getStatusCode()

getResponseContent

public String getResponseContent()

toString

public static String toString(InputStream stream)
Return a String containing the contents of the given InputStream


rewrite-test-harness 1.0.5.Final

Copyright © 2012 OCPsoft. All Rights Reserved.