Class WebSite.WinCGI.Request
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class WebSite.WinCGI.Request

java.lang.Object
   |
   +----WebSite.WinCGI.Request

public final class Request
extends Object

The Request class implements the WebSite Windows CGI/1.3 request information. It is purely a static class, it cannot be instantiated.

Author: Robert B. Denny
Version: 0.2 (experimental)

See Also:
Server, Client, Form, Response

Variable Index

 o in
An InputStream from which you can read the raw content supplied with the request.

Method Index

 o acceptTypeCount()
Returns the number of accept-types in the request.
 o acceptTypeNames()
Returns an AcceptTypeEnumeration of the accept-types in the request.
 o containsAcceptType(String)
Returns true if the request contains the given accept-type.
 o containsExtraHeader(String)
Returns true if the request contains the named extra header.
 o extraHeaderCount()
Returns the number of extra headers in the request.
 o extraHeaderNames()
Returns an ExtraHeaderEnumeration of the extra header names in the request.
 o getAcceptTypeQValues(String)
Returns the "q-values" String for the given accept-type.
 o getContentLength()
Gets the length in bytes of any content that may have been supplied with the request.
 o getContentType()
Gets the media content type of any data attached to the request.
 o getExtraHeader(String)
Gets the value of the named request extra header, or null if it is not present.
 o getFrom()
Gets the email address of the browser user.
 o getLogicalPath()
A request may contain "extra path" elements following the script element.
 o getMethod()
Gets the method with which the request was made.
 o getPhysicalPath()
A request may contain "extra path" elements following the script element.
 o getProtocol()
Gets the name and revision of the protocol with which the request was made.
 o getQueryString()
Gets any information which follows the '?' in the request URL, in its original encoded form.
 o getRanges()
Gets any byte-range request information that was present in the request.
 o getReferer()
Gets the URL of the document that contained the link to this CGI script.
 o getScriptPath()
Gets the URL path of this script.
 o getUserAgent()
Gets the product name and version of the client (browser) that issued the request.

Variables

 o in
  public static InputStream in
An InputStream from which you can read the raw content supplied with the request.

Methods

 o getProtocol
  public static String getProtocol()
Gets the name and revision of the protocol with which the request was made.

Format: protocol/revision.
Example: HTTP/1.0

 o getMethod
  public static String getMethod()
Gets the method with which the request was made. For HTTP, this is GET, POST, etc.
 o getScriptPath
  public static String getScriptPath()
Gets the URL path of this script. May be used to construct self-referencing URLs.
See Also:
URL
 o getLogicalPath
  public static String getLogicalPath()
A request may contain "extra path" elements following the script element. This function retrieves any such extra path information exactly as it appeared in the original URL. Returns null if no extra path information was present.
See Also:
getPhysicalPath
 o getPhysicalPath
  public static String getPhysicalPath()
A request may contain "extra path" elements following the script element. This method retrieves any such extra path information as translated from URL to physical form. Returns null if no extra path information was present.
See Also:
getLogicalPath
 o getQueryString
  public static String getQueryString()
Gets any information which follows the '?' in the request URL, in its original encoded form. null if no query was present.
 o getRanges
  public static String getRanges()
Gets any byte-range request information that was present in the request. This feature of HTTP is presently under development (as of 03/96) and is subject to change. However, the format of the range request string has been agreed-upon, and this variable contains that string. For the latest information on the status of the byte-range extension to HTTP/1.0 and the status of the HTTP/1.1 spec, see the IETF HTTP Working Group Home Page. null if no range information was present.
 o getReferer
  public static String getReferer()
Gets the URL of the document that contained the link to this CGI script. null if no Referer: information was present. The misspelling is historical.
 o getFrom
  public static String getFrom()
Gets the email address of the browser user. This item is included in the HTTP/1.0 specification, however for privacy reasons, it is not generally used, and should not be relied on. null if no From: information was present.
 o getUserAgent
  public static String getUserAgent()
Gets the product name and version of the client (browser) that issued the request. Not generated by some browsers. null if no User Agent: was present.
 o getContentType
  public static String getContentType()
Gets the media content type of any data attached to the request. null if no attached content or if the attached content was (incorrectly) untyped.

Format: type/subtype
Example: multipart/form-data

 o getContentLength
  public static int getContentLength()
Gets the length in bytes of any content that may have been supplied with the request.
 o containsExtraHeader
  public static boolean containsExtraHeader(String name)
Returns true if the request contains the named extra header.
Parameters:
name - The name (label) of the extra header
 o getExtraHeader
  public static String getExtraHeader(String name)
Gets the value of the named request extra header, or null if it is not present.
Parameters:
name - The name (label) of the extra header
 o extraHeaderCount
  public static int extraHeaderCount()
Returns the number of extra headers in the request.
 o extraHeaderNames
  public static ExtraHeaderEnumeration extraHeaderNames()
Returns an ExtraHeaderEnumeration of the extra header names in the request.
See Also:
ExtraHeaderEnumeration
 o containsAcceptType
  public static boolean containsAcceptType(String type)
Returns true if the request contains the given accept-type.
Parameters:
type - The accept-type to check for
 o getAcceptTypeQValues
  public static String getAcceptTypeQValues(String type)
Returns the "q-values" String for the given accept-type. If there are no q-values, this will return the String "Yes".
Parameters:
type - The accept-type to get q-values for
 o acceptTypeCount
  public static int acceptTypeCount()
Returns the number of accept-types in the request.
 o acceptTypeNames
  public static AcceptTypeEnumeration acceptTypeNames()
Returns an AcceptTypeEnumeration of the accept-types in the request.
See Also:
AcceptTypeEnumeration

All Packages  Class Hierarchy  This Package  Previous  Next  Index