aws / aws/chalice

wildcard content type and method

Open
#733 1 comment 0 reactions 0 assignees View on GitHub
feature-request
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

Wildcard content types are currently not supported. Would be nice to have this feature to not be limited by a list - sometimes this is necessary. For example if you are trying to catch all possible requests and their content.

https://github.com/aws/chalice/blob/master/chalice/app.py#L47

Would this project consider merging a solution that would allow:
content_types=['*']

Also I'm not 100% sure there seems to some kind of support for methods with this syntax:
methods=['*']

But if I use it with the decorator I currently still get method not accepted error. Will have to dig deeper into this - this should also probably be supported?

Contributor guide

Open the contributing guide

Research direction

Start in chalice/app.py around line 47 and trace how decorator content_types and methods are validated. Reproduce the reported method-not-accepted case with content_types=['*'] and methods=['*']; done means wildcard values are supported consistently where the issue requests them.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.