struct Halite::RateLimit

Overview

Limit Rate

ref: https://tools.ietf.org/id/draft-polli-ratelimit-headers-00.html

> X-RateLimit-Limit: 5000
> X-RateLimit-Remaining: 4987
> X-RateLimit-Reset: 1350085394

Defined in:

halite/rate_limit.cr

Constant Summary

RATELIMIT_LIMIT = "X-RateLimit-Limit"
RATELIMIT_REMAINING = "X-RateLimit-Remaining"
RATELIMIT_RESET = "X-RateLimit-Reset"

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(limit : Int32 | Nil, remaining : Int32 | Nil, reset : Int32 | Nil) #

[View source]

Class Method Detail

def self.parse(headers : HTTP::Headers) #

[View source]

Instance Method Detail

def limit : Int32? #

[View source]
def remaining : Int32? #

[View source]
def reset : Int32? #

[View source]