Add Java example on how to validate webhook requests#8433
Conversation
| abort(401, 'invalid request signature') | ||
| ``` | ||
|
|
||
| **Java** |
There was a problem hiding this comment.
Definitely not against having multiple code examples, but if we do this, we should use Code Groups:
https://www.mintlify.com/docs/components/code-groups
WDYT @anthonydiscord ? we want multiple code versions?
Edit: we actually want code groups.
There was a problem hiding this comment.
As there is regular text, I have to move it to the code as comments if we do want to use code groups, but then it looks much worse 😬
|
We understand right now code samples are mainly in JS but it might make more sense for libraries to have their own documentation in their languages instead. Let us think for a bit about how we want to handle code samples across languages 🤔 For now I'm going to close this PR but I'll let you know what comes out of this |
|
The reason for adding this was mainly because someone asked in JDA's server, it's not exactly easy to figure out, and I cannot find any JVM library that handles HTTP interactions nor webhook events. So i figured this could help everyone using JVM languages, no matter what Discord library they use, and independently of the webserver being used (there are quite many to choose from) |
Title. Used an external dependency as it is much cleaner than using the standard library.