# Poco::Net

# class HTTPServerRequestImpl

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

## Description

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

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

## Inheritance

Direct Base Classes: HTTPServerRequest

All Base Classes: HTTPMessage, HTTPRequest, HTTPServerRequest, MessageHeader, NameValueCollection

## Member Summary

Member Functions: clientAddress, detachSocket, response, secure, serverAddress, serverParams, session, socket, stream

Inherited Functions: add, begin, clear, clientAddress, decodeRFC2047, decodeWord, empty, end, erase, find, get, getChunkedTransferEncoding, getContentLength, getContentLength64, getContentType, getCookies, getCredentials, getExpectContinue, getFieldLimit, getHost, getKeepAlive, getMethod, getNameLengthLimit, getProxyCredentials, getTransferEncoding, getURI, getValueLengthLimit, getVersion, has, hasContentLength, hasCredentials, hasProxyCredentials, hasToken, operator =, operator [], quote, read, removeCredentials, removeProxyCredentials, response, secure, serverAddress, serverParams, set, setChunkedTransferEncoding, setContentLength, setContentLength64, setContentType, setCookies, setCredentials, setExpectContinue, setFieldLimit, setHost, setKeepAlive, setMethod, setNameLengthLimit, setProxyCredentials, setTransferEncoding, setURI, setValueLengthLimit, setVersion, size, splitElements, splitParameters, stream, swap, write

## Constructors

### HTTPServerRequestImpl

HTTPServerRequestImpl(
HTTPServerResponseImpl & response,
HTTPServerSession & session,
HTTPServerParams * pParams
);

Creates the HTTPServerRequestImpl, using the given HTTPServerSession.

## Destructor

### ~HTTPServerRequestImpl

~HTTPServerRequestImpl();

Destroys the HTTPServerRequestImpl.

## Member Functions

### clientAddress

const SocketAddress & clientAddress() const;

Returns the client's address.

See also: Poco::Net::HTTPServerRequest::clientAddress()

### detachSocket

StreamSocket detachSocket();

Returns the underlying socket after detaching it from the server session.

### response

HTTPServerResponse & response() const;

Returns a reference to the associated response.

See also: Poco::Net::HTTPServerRequest::response()

### secure

bool secure() const;

Returns true if the request is using a secure connection. Returns false if no secure connection is used, or if it is not known whether a secure connection is used.

See also: Poco::Net::HTTPServerRequest::secure()

### serverAddress

const SocketAddress & serverAddress() const;

Returns the server's address.

See also: Poco::Net::HTTPServerRequest::serverAddress()

### serverParams

const HTTPServerParams & serverParams() const;

Returns a reference to the server parameters.

See also: Poco::Net::HTTPServerRequest::serverParams()

### session

HTTPServerSession & session();

Returns the underlying HTTPServerSession.

### socket

StreamSocket & socket();

Returns a reference to the underlying socket.

### stream

std::istream & stream();

Returns the input stream for reading the request body.

The stream is valid until the HTTPServerRequestImpl object is destroyed.

See also: Poco::Net::HTTPServerRequest::stream()