marmelab / FakeRest

Patch fetch/XMLHttpRequest to fake a REST API server in the browser, based on JSON data.
MIT License
439 stars 48 forks source link

[RFR] Add the full-text filter (q) #10

Closed fzaninotto closed 9 years ago

fzaninotto commented 9 years ago
// the special "q" filter makes a full-text search on all text fields
GET /books?filter={q:'and'}

HTTP 1.1 200 OK
Content-Range: items 0-2/3
Content-Type: application/json
[
  { id: 1, author_id: 0, title: 'War and Peace' },
  { id: 2, author_id: 1, title: 'Pride and Prejudice' },
  { id: 3, author_id: 1, title: 'Sense and Sensibility' }
]