Replies: 1 comment
-
You want to get the query params dont you? This is documented in H3 (the server that Nitro uses): https://h3.unjs.io/utils/request#getqueryevent export default defineEventHandler((event) => {
const query = getQuery(event); // { a: "a", b: "b" }
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We can use curl to send information like this right
curl -d 'a=a&b=b' -X POST http://localhost:3000
From my reading of docs and going through the code, I cannot find any way to get the
a=a&b=b
value from the -d flag cleanly.I find that getRequestWebStream(event) returns a Stream which I have to then decode which feels suboptimal. There are also easy ways to get the request header, length, etc but not the actual request content.
Am I missing something?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions