Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

RFE: Support for conditional GET / If-Modified-Since header #436

Open
atodorov opened this Issue · 2 comments

3 participants

@atodorov

I have an application which does send lots of GET requests to your website.

To minimize network load and bandwidth usage I'm sending If-Modified-Since header with every request. Unfortunately the API doesn't seem to support that (or it be configured at present). Please fix it.

I'm using the JSON interface, .e.g. GET http://rubygems.org/api/v1/versions/PACKAGE.json

@qrush qrush added the health label
@qrush
Owner

We should definitely have some stale? checks in the API.

@qrush qrush added the api label
@arthurnn arthurnn self-assigned this
@arthurnn
Collaborator

Yes, we should add more stale? checks on our API, however the versions API already have that check https://github.com/rubygems/rubygems.org/blob/master/app/controllers/api/v1/versions_controller.rb#L10-L12 .
And seems like it is working for me:

curl -i https://rubygems.org/api/v1/versions/rails.json --header 'If-None-Match: "944a74b63f8cfdf4ec5d9521ed003ba0"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.