Skip to content

Redis HTTP Module v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 17 Sep 21:22

Redis HTTP Module v1.0.0

πŸ“¦ Library

  • File: libredis_http.so
  • Architecture: Ubuntu x86_64
  • Size: 6.3M
  • Compatibility: Ubuntu 18.04+ (x86_64)

πŸš€ Quick Installation

# Download the library
wget https://github.com/foogaro/redis-http/releases/download/v1.0.0/libredis_http.so

# Copy to Redis modules directory
sudo cp libredis_http.so /usr/lib/redis/modules/

# Add to redis.conf
echo "loadmodule /usr/lib/redis/modules/libredis_http.so" | sudo tee -a /etc/redis/redis.conf

# Restart Redis
sudo systemctl restart redis

# Test the installation
curl -u ":" http://localhost:4887/GET/test

πŸ“‹ Features

  • HTTP API: GET, POST, PUT, DELETE operations via HTTP
  • Hash Operations: HGET, HGETALL, HSET via HTTP endpoints
  • Multiple Formats: JSON, XML, Plain Text responses
  • Authentication: Basic HTTP authentication with Redis credentials
  • Auto-start: HTTP server automatically starts on port 4887

πŸ”§ Requirements

  • Redis: 6.0 or higher
  • OS: Ubuntu 18.04+ (x86_64 only)
  • Dependencies: OpenSSL library

πŸ“š Usage Examples

Set and Get Data

# Set data via Redis CLI
redis-cli SET user:123 '{"name":"John","email":"john@example.com"}'

# Get data via HTTP
curl -u ":" http://localhost:4887/GET/user:123

Hash Operations

# Set hash data
redis-cli HSET profile:123 name "John Doe" email "john@example.com"

# Get hash field
curl -u ":" http://localhost:4887/MGET/profile:123/name

# Get all hash fields
curl -u ":" http://localhost:4887/MGETALL/profile:123

Different Response Formats

# JSON (default)
curl -u ":" http://localhost:4887/GET/user:123

# XML
curl -H "Accept: application/xml" -u ":" http://localhost:4887/GET/user:123

# Plain Text
curl -H "Accept: text/plain" -u ":" http://localhost:4887/GET/user:123

πŸ”— Links