Each instance supports making a single request and cannot be reused for further requests.
Unlike the Servlet API, a query string is constructed and decomposed by {@link QueryStringEncoder} and {@link QueryStringDecoder}. {@link Cookie}support is also provided separately via {@link CookieEncoder} and{@link CookieDecoder}. @see HttpResponse @see CookieEncoder @see CookieDecoder
Each instance supports making a single request and cannot be reused for further requests.
Implementation is not thread-safe.
@since 1.0 @author Yaniv InbarSupported HTTP methods:
Supported request headers:
Supported timeouts:
Unlike the Servlet API, a query string is constructed and decomposed by {@link QueryStringEncoder} and {@link QueryStringDecoder}. {@link Cookie}support is also provided separately via {@link CookieDecoder}, {@link ClientCookieEncoder}, and {@link @ServerCookieEncoder}. @see HttpResponse @see ClientCookieEncoder @see ServerCookieEncoder @see CookieDecoder
HttpServletRequest
that is to be processed, in order to produce the corresponding HttpResponse
.
@author Craig R. McClanahan
@version $Revision: 466595 $ $Date: 2006-10-21 23:24:41 +0100 (Sat, 21 Oct 2006) $
This class is not synchronized. It should be explicitly synchronized if it is used by multiple threads. @see HttpResponse @version $Id: HttpRequest.java,v 1.91 2006/11/23 08:56:52 gregwilkins Exp $ @author Greg Wilkins (gregw)
此HttpRequest类型的实例可以被序列化,但只有它包含的资源对象支持序列化时, 那些资源对象才可能被序列化。
此类型实现了资源容器抽象接口org.fto.jthink.resource.ResourceContainer, 所以可以将此类型的实例做为资源容器来使用。
历史更新记录: 2005-06-25 创建此类型@author wenjian @version 1.0 @since JThink 1.0 @see javax.servlet.http.HttpServletRequest
This class is not synchronized. It should be explicitly synchronized if it is used by multiple threads. @see HttpResponse @version $Id: HttpRequest.java,v 1.91 2006/11/23 08:56:52 gregwilkins Exp $ @author Greg Wilkins (gregw)
connect
opens a connection to the remote host. HttpRequest
. HttpRequest
sets the appropriate connection header to "Keep-Alive" to keep alive the connection to the host or proxy (respectively). By setting the appropriate connection header, the user can control whether the HttpRequest
tries to use Keep-Alives. HttpRequest
, and is set automatically if the user does not set it. getOutputStream
and writes some data to it, the "Content-Length" header will be set to the amount of data that has been written at the time that connect
is called. close
to release the socket. Although it happens under the covers, the user should be aware that if an IOException occurs or once data has been read normally from the remote host, close
is called automatically. This is to ensure that the minimal number of sockets are left open at any time. The input stream that getInputStream
provides automatically hides whether the remote host is providing HTTP/1.1 "chunked" encoding or regular streaming data. The user can simply read until reaching the end of the input stream, which signifies that all the available data from this request has been read. If reading from a "chunked" source, the data is automatically de-chunked as it is presented to the user. Currently, no access is provided to the underlying raw input stream.
@author Colin Stevens (colin.stevens@sun.com)
@version 2.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|