com.macromedia.net
Class HttpAgentRequest

java.lang.Object
  extended bycom.macromedia.net.HttpAgentRequest

public class HttpAgentRequest
extends java.lang.Object

HttpAgentRequest -- an object that represents an HTTP request you'd like to make. These get added into the HttpAgent and processed in the background.

Note that the `key' is how this request will be known in the response


Constructor Summary
HttpAgentRequest()
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value)
           
 void addParameters(java.util.Hashtable params)
          Add in a whole bunch of params without replacing our current ones
 java.lang.String getBody()
           
 java.lang.String getContentType()
           
 boolean getFollowRedirects()
           
 java.lang.String getHeader(java.lang.String name)
          Get the value of a particular http header
 java.util.Hashtable getHeaders()
          Get a map of all of our custom set headers.
 java.lang.String getKey()
           
 java.lang.String getMethod()
          Get the method that this request will be using.
 java.util.Hashtable getParameters()
           
 java.lang.String getPassword()
           
 java.lang.String getUrl()
           
 boolean getUseCache()
           
 java.lang.String getUsername()
           
 void setBody(java.lang.String body)
           
 void setContentType(java.lang.String contentType)
           
 void setFollowRedirects(boolean followRedirects)
           
 void setHeader(java.lang.String name, java.lang.String value)
          Add an HTTP header to be included
 void setHeaders(java.util.Hashtable headers)
          Set a bunch of headers all at once.
 void setKey(java.lang.String key)
           
 void setMethod(java.lang.String method)
           
 void setParameters(java.util.Hashtable parameters)
          Replace our current parameters with a new set
 void setPassword(java.lang.String password)
           
 void setUrl(java.lang.String url)
           
 void setUseCache(boolean useCache)
           
 void setUserAgent(java.lang.String agent)
          Set the value of the User-Agent you would like our requests to look like.
 void setUsername(java.lang.String username)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpAgentRequest

public HttpAgentRequest()
Method Detail

setKey

public void setKey(java.lang.String key)

getKey

public java.lang.String getKey()

setMethod

public void setMethod(java.lang.String method)

getMethod

public java.lang.String getMethod()
Get the method that this request will be using.

Returns:
an upper case string (always upper case) of the method to be used.

setParameters

public void setParameters(java.util.Hashtable parameters)
Replace our current parameters with a new set


addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value)

addParameters

public void addParameters(java.util.Hashtable params)
Add in a whole bunch of params without replacing our current ones


setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
Add an HTTP header to be included


getHeader

public java.lang.String getHeader(java.lang.String name)
Get the value of a particular http header

Returns:
our header if overriden, or null if the default value will be used.

getHeaders

public java.util.Hashtable getHeaders()
Get a map of all of our custom set headers. May be an empty map, but shouldn't be null.


setHeaders

public void setHeaders(java.util.Hashtable headers)
Set a bunch of headers all at once. This will add to the current collection of headers that have been set.


setUserAgent

public void setUserAgent(java.lang.String agent)
Set the value of the User-Agent you would like our requests to look like.

Note: there's no difference between using this method and calling setHeader("User-Agent", ...);


getParameters

public java.util.Hashtable getParameters()

setUsername

public void setUsername(java.lang.String username)

getUsername

public java.lang.String getUsername()

setPassword

public void setPassword(java.lang.String password)

getPassword

public java.lang.String getPassword()

setContentType

public void setContentType(java.lang.String contentType)

getContentType

public java.lang.String getContentType()

setBody

public void setBody(java.lang.String body)

getBody

public java.lang.String getBody()

setUrl

public void setUrl(java.lang.String url)

getUrl

public java.lang.String getUrl()

setFollowRedirects

public void setFollowRedirects(boolean followRedirects)

getFollowRedirects

public boolean getFollowRedirects()

setUseCache

public void setUseCache(boolean useCache)

getUseCache

public boolean getUseCache()