winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.77k stars 189 forks source link

cloud.Api - method-agnostic route handler #1848

Open Chriscbr opened 1 year ago

Chriscbr commented 1 year ago

Community Note

Please vote by adding a 👍 reaction to the issue to help us prioritize. If you are interested to work on this issue, please leave a comment.

Feature Spec

https://docs.winglang.io/reference/wingsdk-spec#api

This method allows the user to specify an inflight that handles all requests to a particular route (irrespective of the method used).

Use Cases

Similar to app.all() in expressjs (https://expressjs.com/en/4x/api.html#app.all)

Implementation Notes

No response

Component

SDK

github-actions[bot] commented 1 year ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

Chriscbr commented 1 year ago

I wonder if api.all("/path", ...) would be a better name for this method? 🤷‍♂️

github-actions[bot] commented 11 months ago

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

Chriscbr commented 3 months ago

Proposed name by @eladb - api.onRequest(...)