josh
josh
SIASapphire - Imagine a framework
Created by josh on 10/24/2023 in #sapphire-support
plugin-api: How to access Cookies on incoming requests?
nope :/ some years ago when I was in school we were supposed to paint vanitas motives (https://en.wikipedia.org/wiki/Vanitas) and since it is all about the 'certainty of death' and I was really bad at video games, I chose it as my gamer tag
13 replies
SIASapphire - Imagine a framework
Created by josh on 10/24/2023 in #sapphire-support
plugin-api: How to access Cookies on incoming requests?
haha thanks, however i gotta disappoint you, since the backstory for the name is quite different pepeFeelsBadMan
13 replies
SIASapphire - Imagine a framework
Created by josh on 10/24/2023 in #sapphire-support
plugin-api: How to access Cookies on incoming requests?
yes, thanks for your help :)
13 replies
SIASapphire - Imagine a framework
Created by josh on 10/24/2023 in #sapphire-support
plugin-api: How to access Cookies on incoming requests?
sorry if it was unclear, the first route sets the cookie, which the second route should then read. I did not find an attribute such as response.cookies, on the request object, so I didn't know how to get the cookies. As it turns out the problem was with the first route already tho, because it did not set the cookie correctly. I fixed that by using setHeader instead of cookies.set. And now it is also possible to get the cookies in the second route, via response.cookies.get().
13 replies
SIASapphire - Imagine a framework
Created by josh on 10/24/2023 in #sapphire-support
plugin-api: How to access Cookies on incoming requests?
Thanks! Is it also okay to do it via response.cookies.get('...')? It turns out that the thing I messed up was the setting of the cookie, I thought that (on another route), calling response.cookies.set('...', '...') would be the way to do it, but it seems as though I have to set it as a header? cuz now it works - first route response.setHeader, second route response.cookies.get
13 replies
SIASapphire - Imagine a framework
Created by josh on 6/13/2023 in #sapphire-support
sending html using api plugin
that's awesome, thanks a bunch
9 replies
SIASapphire - Imagine a framework
Created by josh on 6/13/2023 in #sapphire-support
sending html using api plugin
😊 posted the PR
9 replies
SIASapphire - Imagine a framework
Created by josh on 6/13/2023 in #sapphire-support
sending html using api plugin
alright, thanks! I'll do that :)
9 replies