Module

x/r2d2/mod.ts>sendCommandRawReply

Fast, lightweight Redis client library for Deno.
Go to Latest
function sendCommandRawReply
import { sendCommandRawReply } from "https://dotland.deno.dev/x/r2d2@v0.0.14/mod.ts";

Sends a command to the Redis server and returns the raw reply.

Example:

const redisConn = await Deno.connect({ port: 6379 });

const value = new Uint8Array([0, 1, 2, 1, 2, 1, 2, 3]);

// Returns "OK"
await sendCommand(redisConn, ["SET", "binary", value]);

// Returns Uint8Array(8) [0, 1, 2, 1, 2, 1, 2, 3]
await sendCommandRawReply(redisConn, ["GET", "binary"]);

Parameters

redisConn: Deno.Conn
command: Command

Returns

Promise<Uint8Array>