brenapp / robotevents

RobotEvents v2 API Module
https://npm.im/robotevents
15 stars 5 forks source link

[BUG] can't get limit info #19

Open guolin opened 5 months ago

guolin commented 5 months ago

Describe the bug I do a simple test:

`

import fetch from 'cross-fetch';

fetch('https://www.robotevents.com/api/v2/events?per_page=250&season%5B%5D=180&page=3', { headers: { 'Origin': 'https://www.robotevents.com/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36', 'Authorization': 'Bearer [key], }, }) .then(response => { console.log('x-ratelimit-limit: ', response.headers.get('x-ratelimit-limit')); console.log('x-ratelimit-remaining: ', response.headers.get('x-ratelimit-remaining')); }) .catch(err => console.error(err));

`

but there is no "x-ratelimit-limit:" response.

so the ratelimit feature is not work.

guolin commented 5 months ago

I add a pull request. :)