-
Not sure if this is the right forum - I should make an issue instead I'd be happy to! I love that you can parse json automatically using the technique in the json example. However, in my testing projects, I've noticed I can't use it in a lot of cases because I also want access to headers and other parts of the request. For example, doing authentication. Would it be possible to have those types of functions take two parameters: the first being the converted json object, and the second being more context? The way I see it, we could just pass the whole raw request as a second parameter; that way, the developer would have any bit of info they need. Or, we could take an approach similar to nodejs Firebase callable functions and have a Context object that contains headers, and maybe method type, query params, ect. Their context object has different details and verifies a JWT from Firebase Auth automatically too. So in this cause we're borrowing the idea of a context even if it's not the same one. Happy to discuss, and if we think it's cool I'd be happy to do a PR - it seems super technically doable from what I've seen of the code, but it'd probably have to be a breaking change. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If anyone finds this, it looks like this is supported already! I found this line in one of the examples that shows how it works - it looks like it provides exactly what I was hoping for! Hope it helps someone else too! |
Beta Was this translation helpful? Give feedback.
If anyone finds this, it looks like this is supported already! I found this line in one of the examples that shows how it works - it looks like it provides exactly what I was hoping for! Hope it helps someone else too!