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

text/html response Using Laravel #6

Open
jhavenz opened this issue Jun 26, 2021 · 1 comment
Open

text/html response Using Laravel #6

jhavenz opened this issue Jun 26, 2021 · 1 comment

Comments

@jhavenz
Copy link

jhavenz commented Jun 26, 2021

Hi there, thank you for your work!

I'm using Laravel, not sure how familiar you are with it but I've gotten the app to respond to a basic hello world command.. though, the app is sending back a text/html response so I was seeing the json string within Slack for a while..

slack-app-response

For the time being, I've created a middleware that checks the headers on the way out but I'm not sure if this is the best way to solve this..

I really look forward to your docs on this.. I've just spent a couple hours looking through the source code and am pretty stoked about what you're putting together here.. seems like a lot of the OS Slack development died out there for a bit.

Keep rocking and rolling brother 👍

p.s. Laravel requires a couple extra composer packages to be installed in order to get the PSR implementation of their request/response system. I did go through all those steps and tried to tweak things around for a bit.. but ultimately the middleware is where I landed for the time being.

@jeremeamia
Copy link
Collaborator

Hey, I'm sorry I didn't see this earlier. Yeah, you'll need to make sure to send an application/json Content-Type for Slack to parse it, otherwise it will treat it as simple message text content.

Development on these libraries has been really slow, unfortunately, but I'm still working on things. I will likely do a Laravel module as some point that implements its own AppServer using Laravel's native request/response objects.

Any feedback you have in the future, send it my way.

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