Skip to content

Query parameters in path cause exception #85

Open
@dimitrovs

Description

@dimitrovs

I understand query parameters are not supported for routing but even using a path with them throws exception:

import { Router, Method } from 'tiny-request-router'

const router = new Router()
router.post('/v1/relays', handleAddRelay);
router.post('/?action=host', handleInitHost);

Causes:

Uncaught TypeError: Unexpected MODIFIER at 1, expected END\n  at line 21 in h\n  at line 21 in i\n  at line 21 in a\n  at line 21 in s\n  at line 21 in e._push\n  at line 21 in e.post\n  at line 1\n  at line 1 in n\n  at line 1\n  at line 1\n

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