Skip to content

artemis-org/restproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

restproxy is a HTTP reverse proxy for the Discord API that includes a ratelimiter.

Where is this used?

We use this utility on the Artemis bot in production.

How does this work?

restproxy is based on an AMQP RPC architecture. A consumer listens on queue for API requests, performs them and then responds through the publisher with the response from the Discord API.

A request object is created, using the URL, the request type, the headers and the content fields from the struct.

The request is then sent to a queue, which the ratelimiter reads from as instructed to by the Discord API, to not trip the ratelimit and get a 429.

Finally, the response is then proxied back to the client. This means that HTTP requests may well take several seconds, and therefore clients using this utility must making all requests asynchronously.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages