hiett / serverless-redis-http

HTTP-based Redis pooler. Access Redis from serverless without overloading connection limits!
MIT License
150 stars 16 forks source link

Is there an example of using HTTP operations with Redis? #31

Closed zqzzq closed 3 months ago

zqzzq commented 3 months ago

I have deployed redis and serverless-redis-http via-docker-compose, but I don't find how to use HTTP to call it, is there a simple example? Thanks.

hiett commented 3 months ago

Hi, the easiest ways to get started are using one of Upstash's SDKs. They are compatible with SRH. See the TypeScript SDK here: https://upstash.com/docs/oss/sdks/ts/redis/getstarted

You can see the internals of making HTTP calls directly here: https://upstash.com/docs/redis/features/restapi#post-command-in-body

However, please note that SRH only implements sending the command in the POST body. The Path method (e.g. /GET/NAME) will not work.

zqzzq commented 3 months ago

Thank you very much. I know how to use it now.