Poco::Net

class HTTPServerRequest

Library: Net
Package: HTTPServer
Header: Poco/Net/HTTPServerRequest.h

Description

This subclass of HTTPRequest is used for representing server-side HTTP requests.

A HTTPServerRequest is passed to the handleRequest() method of HTTPRequestHandler.

Inheritance

Direct Base Classes: HTTPRequest

All Base Classes: HTTPMessage, HTTPRequest, MessageHeader, NameValueCollection

Member Summary

Member Functions: clientAddress, expectContinue, serverAddress, serverParams, stream

Inherited Functions: add, begin, clear, empty, end, erase, find, get, getChunkedTransferEncoding, getContentLength, getContentType, getCookies, getCredentials, getHost, getKeepAlive, getMethod, getTransferEncoding, getURI, getVersion, has, hasCredentials, operator, operator =, quote, read, set, setChunkedTransferEncoding, setContentLength, setContentType, setCookies, setCredentials, setHost, setKeepAlive, setMethod, setTransferEncoding, setURI, setVersion, size, splitElements, splitParameters, swap, write

Constructors

HTTPServerRequest

HTTPServerRequest(
    HTTPServerSession & session,
    HTTPServerParams * pParams
);

Creates the HTTPServerRequest, using the given HTTPServerSession.

Destructor

~HTTPServerRequest virtual

~HTTPServerRequest();

Destroys the HTTPServerRequest.

Member Functions

clientAddress inline

const SocketAddress & clientAddress() const;

Returns the client's address.

expectContinue

bool expectContinue() const;

Returns true if the client expects a 100 Continue response.

serverAddress inline

const SocketAddress & serverAddress() const;

Returns the server's address.

serverParams inline

const HTTPServerParams & serverParams() const;

Returns a reference to the server parameters.

stream inline

std::istream & stream();

Returns the input stream for reading the request body.

The stream is valid until the HTTPServerRequest object is destroyed.