helma.Http

Object
   |
   +--helma.Http


This class provides functionality to programatically issue an Http request based on java.net.HttpUrlConnection. By default the request will use method GET.
Defined in Http.js



Constructor Summary
helma.Http()
            Creates a new instance of helma.Http
 
Methods Summary
 Boolean getBinaryMode()
           Returns the currently defined binary mode of this client
 String getCookie(<String> name)
           Returns the value of the cookie with the given name
 Object getCookies()
           Returns all cookies set for this client
 Object getFollowRedirects()
           Returns true if the client follows redirects
 String getHeader(<String> name)
           Returns the value of the request header field with the given name
 String getMethod()
           Returns the currently defined request method.
 String getProxy()
           Returns the proxy in host:port format
 Number getReadTimeout()
           Returns the read timeout (the maximum time a request may take after the connection has been successfully established).
 Number getTimeout()
           Returns the connection timeout
 Object getUrl(<String> url, <Date|String> opt)
           Executes a http request
 String getUserAgent()
           Returns the value of the HTTP "User-Agent" header field
 void setBinaryMode(<Boolean> mode)
           Switches content text encoding on or off.
 void setContent(<String|Object> stringOrObject)
           Sets the content to send to the remote server within this request.
 void setCookie(<String> name, <String> value)
           Adds a cookie with the name and value passed as arguments to the list of cookies to send to the remote server.
 void setCredentials(<String> username, <String> password)
           Sets the credentials for basic http authentication
 void setFollowRedirects(<Boolean> value)
           Enables or disables following redirects
 void setHeader(<String> name, <String> value)
           Sets a single HTTP request header field
 void setMethod(<String> m)
           Sets the request method to use.
 void setProxy(<String> proxyString)
           Sets the proxy host and port for later use.
 Object setReadTimeout(<Number> timeout)
           Sets the read timeout (the maximum time a request may take after the connection has been successfully established) to the amount of milliseconds passed as argument.
 void setTimeout(<Number> timeout)
           Sets the connection timeout to the amount of milliseconds passed as argument
 void setUserAgent(<String> agent)
           Sets the HTTP "User-Agent" header field to the string passed as argument
<static>  java.net.URL evalUrl(<String> url)
           Evaluates the url passed as argument.
<static>  Boolean isAuthorized(<String> name, <String> pwd)
           Static helper method to check if a request issued agains a Helma application is authorized or not.

Constructor Detail

helma.Http

helma.Http()

Method Detail

getBinaryMode

Boolean getBinaryMode()

getCookie

String getCookie(<String> name)

getCookies

Object getCookies()

getFollowRedirects

Object getFollowRedirects()

getHeader

String getHeader(<String> name)

getMethod

String getMethod()

getProxy

String getProxy()

getReadTimeout

Number getReadTimeout()

getTimeout

Number getTimeout()

getUrl

Object getUrl(<String> url, <Date|String> opt)

getUserAgent

String getUserAgent()

setBinaryMode

void setBinaryMode(<Boolean> mode)

setContent

void setContent(<String|Object> stringOrObject)

setCookie

void setCookie(<String> name, <String> value)

setCredentials

void setCredentials(<String> username, <String> password)

setFollowRedirects

void setFollowRedirects(<Boolean> value)

setHeader

void setHeader(<String> name, <String> value)

setMethod

void setMethod(<String> m)

setProxy

void setProxy(<String> proxyString)

setReadTimeout

Object setReadTimeout(<Number> timeout)

setTimeout

void setTimeout(<Number> timeout)

setUserAgent

void setUserAgent(<String> agent)

evalUrl

<static> java.net.URL evalUrl(<String> url)

isAuthorized

<static> Boolean isAuthorized(<String> name, <String> pwd)


Documentation generated by JSDoc on Thu Apr 5 01:59:00 2007