MaRequest Class ReferenceInheritance diagram for MaRequest:
List of all members.
Detailed Description
Manage a HTTP request from a client.
The Request class manages a HTTP client request to the server. If TCP/IP Keep-Alive is used, the Request object may be reused for subsequent requests from the client on the same TCP/IP socket connection. - Stability classification:
- Evolving
Member Function Documentation
| void MaRequest::createSession |
( |
int |
timeout |
) |
|
|
|
|
- Synopsis:
- Create a new session data store
- Overview:
- Create a new session data store and associate it with this request.
- Parameters:
-
| timeout | Time in seconds for the session data store to live. |
- Configure options:
- Requires BLD_FEATURE_SESSION
|
| void MaRequest::destroySession |
( |
|
) |
|
|
|
|
- Synopsis:
- Destroy the session data store
- Overview:
- Destroy the session data store associated with this request. This call will have no effect if a store has not been created.
- Configure options:
- Requires BLD_FEATURE_SESSION
|
| cchar * MaRequest::getCookie |
( |
|
) |
|
|
|
|
- Synopsis:
- Get any cookie sent with this request.
- Overview:
- This call returns the cookie string sent by the client with the request.
- Returns:
- NULL if no cookie is defined. Otherwise it returns a pointer to the cookie string. The caller must NOT free this string.
- Stability classification:
- Evolving.
- Library:
- libappweb
- Configure options:
- Requires BLD_FEATURE_COOKIE or BLD_FEATURE_SESSION
- See also:
- getCrackedCookie, setCookie
|
| MaSession * MaRequest::getSession |
( |
|
) |
[inline] |
|
|
|
- Synopsis:
- Get the session data store
- Overview:
- Get the session data store associated with this request.
- Returns:
- Returns a pointer to the Session object. Return zero if no session data store has been created.
- Configure options:
- Requires BLD_FEATURE_SESSION
|
| char * MaRequest::getSessionId |
( |
|
) |
[inline] |
|
|
|
- Synopsis:
- Return the Session ID
- Overview:
- Return the session ID associated with this session. Session IDs are strings that are unique in the server responding to the request.
- Returns:
- Returns a pointer to the Session ID string. Do not free.
- Configure options:
- Requires BLD_FEATURE_SESSION
|
| bool MaRequest::matchEtag |
( |
cchar * |
realEtag |
) |
[inline] |
|
|
|
- Synopsis:
- Returns whether conditional request should be performed
- Overview:
- This call compares ETag-fields sent with request with the ETag supplied by the client, and returns true or false depending on was a match requested or not.
- Parameters:
-
| realEtag | ETag regenerated from the file |
- Returns:
- true if the etag matches, otherwise returns false.
|
| bool MaRequest::matchModified |
( |
uint |
realModTime |
) |
[inline] |
|
|
|
- Synopsis:
- Returns whether conditional request should be performed
- Overview:
- This call compares value from last modification time sent with request towards the real last modification time of the file, and returns true or false depending on was a modification requested or not.
- Parameters:
-
| realModTime | Last modified time of the resource in the client's cache. |
- Returns:
- true if the modified header supplied by the client has been satisfied and no full response is required.
|
| int MaRequest::readPostData |
( |
char * |
buf, |
|
|
int |
bufsize |
|
) |
|
|
|
|
- Synopsis:
- Read post data sent by the client in a HTTP POST request.
- Overview:
- This call is used by Appweb handlers to read post data sent by the client. Handlers may operate in PUSH or PULL mode with respect to post data. In PUSH mode, appweb will call the handlers postData method whenever post data arrives. In PULL mode, the handler calls readPostData when it is ready to accept post data. To enable PULL mode, a handler should call setPullPost.
readPostData may block while reading POST data. As such it should only be used when Appweb is running in multi-threaded mode. - Note:
- In PUSH mode, the postData method will be called when the handler is idle. It will never be issued on another thread while the handler is active.
- Parameters:
-
| buf | Pointer to buffer to store the post data |
| bufsize | Length of buf |
- Returns:
- Returns the number of bytes read. It will return 0 on EOF and will return a negative MPR error code on errors.
- Stability classification:
- Evolving.
- Library:
- libappweb
- See also:
- MaHandler::postData, setPullPost
|
| void MaRequest::setPullPost |
( |
|
) |
|
|
|
|
- Synopsis:
- Switch the handler to manually pull the HTTP POST data.
- Overview:
- This call is used by handlers to tell Appweb that post data must not be sent asynchronously via the postData method. Instead, the handler desires to read the post data manually.
- Stability classification:
- Evolving.
- Library:
- libappweb
- See also:
- getVar
|
The documentation for this class was generated from the following files:
|