Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform a query for autocomplete #156

Open
DeborahK opened this issue Mar 23, 2021 · 1 comment
Open

Perform a query for autocomplete #156

DeborahK opened this issue Mar 23, 2021 · 1 comment

Comments

@DeborahK
Copy link

DeborahK commented Mar 23, 2021

Consider adding an option to perform a query to allow for an autocomplete. It would match the start of a field. Something like:

https://jsonplaceholder.typicode.com/posts?_query=qui

Would return all of the posts that start with the defined characters.

Something like provided here: https://swapi.dev/documentation under "search"

OR

Something like this:

https://jsonplaceholder.typicode.com/posts?title=^q  // regex syntax

Thanks!

@mohaned2014
Copy link

you can use
https://jsonplaceholder.typicode.com/posts?title_like=^q // regex syntax

In general, the API supports everything implemented by JSON Server. You can check that project's README/docs for paging/sort/filter/search related parameters: https://github.com/typicode/json-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants