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

Support all HTTP methods for Webendpoint handlers #1425

Open
lcf opened this issue Jan 23, 2025 · 3 comments
Open

Support all HTTP methods for Webendpoint handlers #1425

lcf opened this issue Jan 23, 2025 · 3 comments
Labels
enhancement M-T: A feature request for new functionality question M-T: User needs support to use the project

Comments

@lcf
Copy link

lcf commented Jan 23, 2025

Currently only GET and POST are supported (for no apparent reason)
https://github.com/slackapi/java-slack-sdk/blob/main/bolt/src/main/java/com/slack/api/bolt/WebEndpoint.java#L17

Alternatively, allow adding custom servlet handlers into SlackAppServer.

@lcf lcf added the untriaged label Jan 23, 2025
@vegeris vegeris added enhancement M-T: A feature request for new functionality question M-T: User needs support to use the project and removed untriaged labels Jan 24, 2025
@seratch
Copy link
Member

seratch commented Jan 24, 2025

Hi @lcf, thanks for writing in! As mentioned here, the custom endpoint is supposed to be used for serving relatively simple URLs such as system healthcheck ones. So, if you need complehensitve HTTP method support, please go ahead with usual custom servlet handlers.

@lcf
Copy link
Author

lcf commented Jan 25, 2025

thank you for your response @seratch . The only problem is that we will have to copy-paste entire SlackAppServer, in order to add custom handlers - or is there an easier way?

@seratch
Copy link
Member

seratch commented Jan 28, 2025

@lcf In this case, I'd suggest embedding your Slack app within a Spring Boot app and run the whole app with a servlet server like Jetty. You can find examples at https://github.com/slackapi/java-slack-sdk/tree/main/bolt-spring-boot-examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality question M-T: User needs support to use the project
Projects
None yet
Development

No branches or pull requests

3 participants