rewrite-test-harness 1.0.0.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 java.lang.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, java.lang.String baseUrl, java.lang.String contextPath)
           
 
Method Summary
 org.apache.http.client.HttpClient getClient()
           
 org.apache.http.protocol.HttpContext getContext()
           
 java.lang.String getContextPath()
           
 java.lang.String getCurrentContextRelativeURL()
          Return the current URL excluding host or context root.
 java.lang.String getCurrentURL()
          Return the current full URL.
 java.lang.String getHost()
          Return the URL up to and including the host and port.
 T getRequest()
           
 org.apache.http.HttpResponse getResponse()
           
 java.lang.String getResponseContent()
           
 java.util.List<java.lang.String> getResponseHeaderValues(java.lang.String name)
           
 int getStatusCode()
           
static java.lang.String toString(java.io.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,
                  java.lang.String baseUrl,
                  java.lang.String contextPath)
Method Detail

getCurrentURL

public java.lang.String getCurrentURL()
Return the current full URL.


getCurrentContextRelativeURL

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


getHost

public java.lang.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 java.lang.String getContextPath()

getResponseHeaderValues

public java.util.List<java.lang.String> getResponseHeaderValues(java.lang.String name)

getStatusCode

public int getStatusCode()

getResponseContent

public java.lang.String getResponseContent()

toString

public static java.lang.String toString(java.io.InputStream stream)
Return a String containing the contents of the given InputStream


rewrite-test-harness 1.0.0.Final

Copyright © 2012 OCPsoft. All Rights Reserved.