org.apache.sling.testing.tools.http
Class Request

java.lang.Object
  extended by org.apache.sling.testing.tools.http.Request

public class Request
extends java.lang.Object

Request class with convenience with... methods to add headers, parameters etc.


Method Summary
 RequestCustomizer getCustomizer()
           
 java.lang.String getPassword()
           
 boolean getRedirects()
           
 org.apache.http.client.methods.HttpUriRequest getRequest()
           
 java.lang.String getUsername()
           
 java.lang.String toString()
           
 Request withContent(java.lang.String content)
           
 Request withCredentials(java.lang.String username, java.lang.String password)
           
 Request withCustomizer(RequestCustomizer c)
           
 Request withEntity(org.apache.http.HttpEntity e)
           
 Request withHeader(java.lang.String name, java.lang.String value)
           
 Request withRedirects(boolean followRedirectsAutomatically)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRequest

public org.apache.http.client.methods.HttpUriRequest getRequest()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

withHeader

public Request withHeader(java.lang.String name,
                          java.lang.String value)

withCredentials

public Request withCredentials(java.lang.String username,
                               java.lang.String password)

withRedirects

public Request withRedirects(boolean followRedirectsAutomatically)

withContent

public Request withContent(java.lang.String content)
                    throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

withEntity

public Request withEntity(org.apache.http.HttpEntity e)
                   throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

withCustomizer

public Request withCustomizer(RequestCustomizer c)

getUsername

public java.lang.String getUsername()

getPassword

public java.lang.String getPassword()

getRedirects

public boolean getRedirects()

getCustomizer

public RequestCustomizer getCustomizer()


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.