org.astrogrid.samp.xmlrpc.internal
Class HttpServer.Request

java.lang.Object
  extended byorg.astrogrid.samp.xmlrpc.internal.HttpServer.Request
Enclosing class:
HttpServer

public static class HttpServer.Request
extends Object

Represents a parsed HTTP client request.


Constructor Summary
HttpServer.Request(String method, String url, Map headerMap, byte[] body)
          Constructor.
 
Method Summary
 byte[] getBody()
          Returns the body of the HTTP request if there was one.
 Map getHeaderMap()
          Returns a map of key-value pairs representing HTTP request headers.
 String getMethod()
          Returns the request method string.
 String getUrl()
          Returns the request URL string.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpServer.Request

public HttpServer.Request(String method,
                          String url,
                          Map headerMap,
                          byte[] body)
Constructor.

Parameters:
method - HTTP method string (GET, HEAD etc)
url - requested URL path (should start "/")
headerMap - map of HTTP request header key-value pairs
body - bytes comprising request body, or null if none present
Method Detail

getMethod

public String getMethod()
Returns the request method string.

Returns:
GET, HEAD, or whatever

getUrl

public String getUrl()
Returns the request URL string. This should be a path starting "/" (the hostname part is not present).

Returns:
url path

getHeaderMap

public Map getHeaderMap()
Returns a map of key-value pairs representing HTTP request headers.

Returns:
headers

getBody

public byte[] getBody()
Returns the body of the HTTP request if there was one.

Returns:
body bytes or null

toString

public String toString()


Copyright © 2008 AstroGrid. All Rights Reserved.