# Poco::MongoDB

# class RequestMessage

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/RequestMessage.h

## Description

Base class for a request sent to the MongoDB server.

## Inheritance

Direct Base Classes: Message

All Base Classes: Message

Known Derived Classes: UpdateRequest, GetMoreRequest, InsertRequest, DeleteRequest, KillCursorsRequest, QueryRequest

## Member Summary

Member Functions: buildRequest, send

Inherited Functions: header, messageLength

## Constructors

### RequestMessage

explicit RequestMessage(
MessageHeader::OpCode opcode
);

Creates a RequestMessage using the given opcode.

## Destructor

### ~RequestMessage

virtual ~RequestMessage();

Destroys the RequestMessage.

## Member Functions

### send

void send(
std::ostream & ostr
);

Writes the request to stream.

### buildRequest

virtual void buildRequest(
BinaryWriter & ss
) = 0;