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

Passing query params breaks route in local #196

Closed
atomaka opened this issue Dec 11, 2016 · 1 comment
Closed

Passing query params breaks route in local #196

atomaka opened this issue Dec 11, 2016 · 1 comment

Comments

@atomaka
Copy link

atomaka commented Dec 11, 2016

When using chalice local, a route will not match if parameters are passed via the query string.

Given:

from chalice import Chalice

app = Chalice(app_name='web')

@app.route('/')
def index():
    name = app.current_request.query_params.get('name')
    return {'hello': name}

Running chalice local and then visiting http://localhost:8000/?name=test will result in ERR_EMPTY_RESPONSE with an error tracing back to raise ValueError("No matching route found for: %s" % url).

Running chalice deploy and then visiting the provided URL functions as expected and will return {"hello": "test"}.

@jamesls
Copy link
Member

jamesls commented Dec 27, 2016

Fixed via #184

@jamesls jamesls closed this as completed Dec 27, 2016
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