Reference

boost::redis::request

Represents a Redis request.

Synopsis

Declared in <boost/redis/request.hpp>

class request;

Types

Name

Description

config

Request configuration options.

Member Functions

Name

Description

request [constructor]

Constructor

get_expected_responses

Returns the number of responses expected for this request.

get_commands

Returns the number of commands contained in this request.

clear

Clears the request preserving allocated memory.

reserve

Calls std::string::reserve on the internal storage.

get_config

Returns a reference to the config object.

push

Appends a new command to the end of the request.

push_range

Appends a new command to the end of the request.

Non-Member Functions

Name

Description

resp3::boost_redis_to_bulk

Adds a bulk to the request.

Description

A request is composed of one or more Redis commands and is referred to in the redis documentation as a pipeline. See for more info.

For example:

request r;
r.push("HELLO", 3);
r.push("FLUSHALL");
r.push("PING");
r.push("PING", "key");
r.push("QUIT");

Uses a std::string for internal storage.

Created with MrDocs