railo.runtime.util
Interface HTTPUtil

All Known Implementing Classes:
HTTPUtilImpl

public interface HTTPUtil


Field Summary
static short ACTION_GET
          Field ACTION_GET
static short ACTION_POST
          Field ACTION_POST
static int STATUS_OK
          Field STATUS_OK
 
Method Summary
 String decode(String str, String charset)
          translate a url encoded string to a regular string
 org.apache.commons.httpclient.HttpMethod delete(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, org.apache.commons.httpclient.Header[] headers)
           
 String encode(String str, String charset)
          translate a string in the URLEncoded Format
 org.apache.commons.httpclient.HttpMethod get(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, org.apache.commons.httpclient.Header[] headers)
          make a http requst to given url
 org.apache.commons.httpclient.HttpMethod head(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, org.apache.commons.httpclient.Header[] headers)
           
 org.apache.commons.httpclient.HttpMethod put(URL url, String username, String password, int timeout, String charset, String useragent, String proxyserver, int proxyport, String proxyuser, String proxypassword, org.apache.commons.httpclient.Header[] headers, org.apache.commons.httpclient.methods.RequestEntity body)
           
 org.apache.commons.httpclient.methods.RequestEntity toRequestEntity(Object value)
           
 Object toURL(org.apache.commons.httpclient.HttpMethod httpMethod)
           
 URL toURL(String strUrl)
          cast a string to a url
 URL toURL(String strUrl, int port)
          cast a string to a url
 

Field Detail

ACTION_POST

static final short ACTION_POST
Field ACTION_POST

See Also:
Constant Field Values

ACTION_GET

static final short ACTION_GET
Field ACTION_GET

See Also:
Constant Field Values

STATUS_OK

static final int STATUS_OK
Field STATUS_OK

See Also:
Constant Field Values
Method Detail

get

org.apache.commons.httpclient.HttpMethod get(URL url,
                                             String username,
                                             String password,
                                             int timeout,
                                             String charset,
                                             String useragent,
                                             String proxyserver,
                                             int proxyport,
                                             String proxyuser,
                                             String proxypassword,
                                             org.apache.commons.httpclient.Header[] headers)
                                             throws IOException
make a http requst to given url

Parameters:
url -
username -
password -
timeout -
charset -
useragent -
proxyserver -
proxyport -
proxyuser -
proxypassword -
Returns:
resulting inputstream
Throws:
IOException

put

org.apache.commons.httpclient.HttpMethod put(URL url,
                                             String username,
                                             String password,
                                             int timeout,
                                             String charset,
                                             String useragent,
                                             String proxyserver,
                                             int proxyport,
                                             String proxyuser,
                                             String proxypassword,
                                             org.apache.commons.httpclient.Header[] headers,
                                             org.apache.commons.httpclient.methods.RequestEntity body)
                                             throws IOException
Throws:
IOException

delete

org.apache.commons.httpclient.HttpMethod delete(URL url,
                                                String username,
                                                String password,
                                                int timeout,
                                                String charset,
                                                String useragent,
                                                String proxyserver,
                                                int proxyport,
                                                String proxyuser,
                                                String proxypassword,
                                                org.apache.commons.httpclient.Header[] headers)
                                                throws IOException
Throws:
IOException

head

org.apache.commons.httpclient.HttpMethod head(URL url,
                                              String username,
                                              String password,
                                              int timeout,
                                              String charset,
                                              String useragent,
                                              String proxyserver,
                                              int proxyport,
                                              String proxyuser,
                                              String proxypassword,
                                              org.apache.commons.httpclient.Header[] headers)
                                              throws IOException
Throws:
IOException

toRequestEntity

org.apache.commons.httpclient.methods.RequestEntity toRequestEntity(Object value)
                                                                    throws PageException
Throws:
PageException

toURL

URL toURL(String strUrl,
          int port)
          throws MalformedURLException
cast a string to a url

Parameters:
strUrl - string represent a url
Returns:
url from string
Throws:
MalformedURLException

toURL

URL toURL(String strUrl)
          throws MalformedURLException
cast a string to a url

Parameters:
strUrl - string represent a url
Returns:
url from string
Throws:
MalformedURLException

toURL

Object toURL(org.apache.commons.httpclient.HttpMethod httpMethod)

encode

String encode(String str,
              String charset)
              throws UnsupportedEncodingException
translate a string in the URLEncoded Format

Parameters:
str - String to translate
charset - charset used for translation
Returns:
encoded String
Throws:
UnsupportedEncodingException

decode

String decode(String str,
              String charset)
              throws UnsupportedEncodingException
translate a url encoded string to a regular string

Parameters:
str - encoded string
charset - charset used
Returns:
raw string
Throws:
UnsupportedEncodingException


Copyright © 2012 Railo