Index ¦ Archives ¦ RSS

Making Conditional Requests with Peter Murach's gem

GitHub imposes a rate limit on API requests, and encourages developers to use conditional requests. Here is how to do that using Peter's popular github api gem.

Method A - Faraday HTTP Cache w. ActiveSupport::Cache

This uses the faraday-http-cache gem, which takes care of expiration, etags, and response statuses.

Method B - Faraday HTTP Cache w. Moneta

More details are available in this issue.

© James Lim. Built using Pelican. Theme by Giulio Fidente on github.