Skip to content

Query params #9

@jacwright

Description

@jacwright

Would you be open to a contribution that supported query params?

It would be removing the query string from the end of the uri sent to run before looking for matching routes, then splitting they query string into its key-value pairs and sending those as a second parameter to the route function. E.g.

router.on('/users', (params, query) => {
  // use query params to sort, filter, etc the user list.
  const { sort, filter, limit } = query;
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions