Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 925 Bytes

SPEC.md

File metadata and controls

25 lines (17 loc) · 925 Bytes

Range HTTP Header Spec for HTTP APIs

Largely from Heroku's Range header documentation.

Range: <attr> [<]>]<first>..<last>[<[>][; order=<asc|desc>][; max=<int>]

The [ and ] exclusion operators are described thusly, assuming a range from a to z:

  • a..z to get everything
  • a.. to get the default size worth of results greater than or equal to a
  • ..z to get the default size worth of results less than or equal to z
  • ]a.. results greater than a (not greater than or equal as above)
  • ..z[ results less than z (not less than or equal as above)

Intentional deviations from Heroku's design:

  • Separate order and max into separate parameters delimited by ; to avoid two needless rounds of parsing (; and ,)