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

Remove the deprecated function in SDK #1677

Open
cloudxxx8 opened this issue Feb 14, 2025 · 0 comments
Open

Remove the deprecated function in SDK #1677

cloudxxx8 opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cloudxxx8
Copy link
Member

cloudxxx8 commented Feb 14, 2025

🚀 Feature Request

Relevant Package [REQUIRED]

This feature request is for app service

Description [REQUIRED]

// AddRoute adds a custom REST route to the application service's internal webserver
// A reference to this ApplicationService is add the the context that is passed to the handler, which
// can be retrieved using the `AppService` key
// Deprecated: It is recommended to use AddCustomRoute() instead and enable authentication for custom routes
// TODO: Remove in 4.0
AddRoute(route string, handler func(http.ResponseWriter, *http.Request), methods ...string) error

// AddRoute allows you to leverage the existing webserver to add routes.
// DEPRECATED - Use AddCustomRoute
// TODO: Remove in 4.0
func (svc *Service) AddRoute(route string, handler func(nethttp.ResponseWriter, *nethttp.Request), methods ...string) error {
// Legacy behavior is to add unauthenticated route
return svc.AddCustomRoute(route, interfaces.Unauthenticated, utils.WrapHandler(handler), methods...)
}

Remove the deprecated function and outdated TODO

// TODO: Change signature in 4.0 to use "handler echo.HandlerFunc"

@cloudxxx8 cloudxxx8 added the enhancement New feature or request label Feb 14, 2025
@github-project-automation github-project-automation bot moved this to New Issues in Technical WG Feb 14, 2025
@cloudxxx8 cloudxxx8 assigned lindseysimple and unassigned FelixTing Feb 20, 2025
@cloudxxx8 cloudxxx8 moved this from New Issues to Release Backlog in Technical WG Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Release Backlog
Development

No branches or pull requests

3 participants