railo.commons.net.http
Class HTTPEngine

java.lang.Object
  extended by railo.commons.net.http.HTTPEngine

public class HTTPEngine
extends Object


Field Summary
static short ACTION_GET
          Field ACTION_GET
static short ACTION_POST
          Field ACTION_POST
static int MAX_REDIRECT
           
static int STATUS_OK
          Field STATUS_OK
static int STATUS_REDIRECT_FOUND
          Constant value for HTTP Status Code "Found 302"
static int STATUS_REDIRECT_MOVED_PERMANENTLY
          Constant value for HTTP Status Code "moved Permanently 301"
static int STATUS_REDIRECT_SEE_OTHER
          Constant value for HTTP Status Code "see other 303"
 
Constructor Summary
HTTPEngine()
           
 
Method Summary
static HTTPResponse delete(URL url, String username, String password, int timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
           
static HTTPResponse get(URL url)
           
static HTTPResponse get(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
           
static Entity getByteArrayEntity(byte[] barr, String contentType)
           
static Entity getEmptyEntity(String contentType)
           
static Entity getResourceEntity(Resource res, String contentType)
           
static Entity getTemporaryStreamEntity(TemporaryStream ts, String contentType)
           
static HTTPResponse head(URL url, String username, String password, int timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
           
static Header header(String name, String value)
           
static HTTPResponse post(URL url)
           
static HTTPResponse post(URL url, String username, String password, long timeout, int maxRedirect, String charset, String useragent, ProxyData proxy, Header[] headers)
           
static HTTPResponse put(URL url, String username, String password, int timeout, int maxRedirect, String mimetype, String charset, String useragent, ProxyData proxy, Header[] headers, Object body)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_POST

public static final short ACTION_POST
Field ACTION_POST

See Also:
Constant Field Values

ACTION_GET

public static final short ACTION_GET
Field ACTION_GET

See Also:
Constant Field Values

STATUS_OK

public static final int STATUS_OK
Field STATUS_OK

See Also:
Constant Field Values

MAX_REDIRECT

public static final int MAX_REDIRECT
See Also:
Constant Field Values

STATUS_REDIRECT_MOVED_PERMANENTLY

public static final int STATUS_REDIRECT_MOVED_PERMANENTLY
Constant value for HTTP Status Code "moved Permanently 301"

See Also:
Constant Field Values

STATUS_REDIRECT_FOUND

public static final int STATUS_REDIRECT_FOUND
Constant value for HTTP Status Code "Found 302"

See Also:
Constant Field Values

STATUS_REDIRECT_SEE_OTHER

public static final int STATUS_REDIRECT_SEE_OTHER
Constant value for HTTP Status Code "see other 303"

See Also:
Constant Field Values
Constructor Detail

HTTPEngine

public HTTPEngine()
Method Detail

get

public static HTTPResponse get(URL url)
                        throws IOException
Throws:
IOException

post

public static HTTPResponse post(URL url)
                         throws IOException
Throws:
IOException

get

public static HTTPResponse get(URL url,
                               String username,
                               String password,
                               long timeout,
                               int maxRedirect,
                               String charset,
                               String useragent,
                               ProxyData proxy,
                               Header[] headers)
                        throws IOException
Throws:
IOException

post

public static HTTPResponse post(URL url,
                                String username,
                                String password,
                                long timeout,
                                int maxRedirect,
                                String charset,
                                String useragent,
                                ProxyData proxy,
                                Header[] headers)
                         throws IOException
Throws:
IOException

head

public static HTTPResponse head(URL url,
                                String username,
                                String password,
                                int timeout,
                                int maxRedirect,
                                String charset,
                                String useragent,
                                ProxyData proxy,
                                Header[] headers)
                         throws IOException
Throws:
IOException

put

public static HTTPResponse put(URL url,
                               String username,
                               String password,
                               int timeout,
                               int maxRedirect,
                               String mimetype,
                               String charset,
                               String useragent,
                               ProxyData proxy,
                               Header[] headers,
                               Object body)
                        throws IOException
Throws:
IOException

delete

public static HTTPResponse delete(URL url,
                                  String username,
                                  String password,
                                  int timeout,
                                  int maxRedirect,
                                  String charset,
                                  String useragent,
                                  ProxyData proxy,
                                  Header[] headers)
                           throws IOException
Throws:
IOException

header

public static Header header(String name,
                            String value)

getEmptyEntity

public static Entity getEmptyEntity(String contentType)

getByteArrayEntity

public static Entity getByteArrayEntity(byte[] barr,
                                        String contentType)

getTemporaryStreamEntity

public static Entity getTemporaryStreamEntity(TemporaryStream ts,
                                              String contentType)

getResourceEntity

public static Entity getResourceEntity(Resource res,
                                       String contentType)


Copyright © 2012 Railo