Rasel Hossain
Rasel Hossain2mo ago

How to get the Request Body data of QStash

Hello everyone. I'm currently working on a client project that involves using trpc with Next.js. We're using Qstash as our message queue service, and I'm trying to publish a message to updateSubscription procedure. However, Qstash only supports POST requests. So, I created a mutation procedure in the trpc server. My question is, how can I receive the body data in the trpc procedure? I tried using input, but it seems like Qstash can't send the request. Could anyone please guide me on how to tackle this issue?
No description
No description
7 Replies
Sandvich
Sandvich2mo ago
I think you need /api/trpc/subscription.updateSubscription?batch=1
body: {
0: {
json: {
data:
....
body: {
0: {
json: {
data:
....
if you check your browser devtools you'll see that's how trpc sends requests
Sandvich
Sandvich2mo ago
No description
No description
Rasel Hossain
Rasel Hossain2mo ago
thanks Sandvich
Rasel Hossain
Rasel Hossain2mo ago
There is an issue with Qstash publishing messages. It injects some headers in the request headers when publishing the message. Although I can see the input value, I am unable to view the request headers. Can you please guide me on how to access the request headers?
No description
Rasel Hossain
Rasel Hossain2mo ago
@Sandvich
Sandvich
Sandvich2mo ago
No idea what Qstash is or how it works. Probably best reading their documentation
Rasel Hossain
Rasel Hossain2mo ago
I have already read it, but I did not find any solution.
More Posts
Preventing uncaught error propagation from server to clientHello guys, is there any way to create default error handler? I want to avoid leaking internal inforThrowing something other than `Unexpected token '<', "<!DOCTYPE "... is not valid JSON`I'm trying to do custom error handling but whatever I throw just ends up being `Unexpected token '<'Create client that is used in every request, without re-creating clientHi all, Consider the following ``` export const createContextInner = async ({ req, res, }: { Using TRPC Server Caller in client side.What's up TRPCer. so i'm currently working in vanilla react app with seperate backend in .NET, in pAnyone has successfully setup a websockets subscription with an input ?Hi guys, here is my environment: *** node v20.11.1 * yarn@4.1.0 * trpc 11.0.0-next-beta.294 * next 1Middleware context changes aren't applied to `responseMeta(opts)` optionsIn our middleware I extend the ctx like this: ```ts const public = t.middleware(async ({ next, ctx Cookie authentication flowHello can i get a bit of a help and explanation please? Im frontend learning backend on trpc, I haveIs It Possible to use methodOverride with createNextApiHandler?I'm trying to build queries for grids and filter and sort object could get very large which is exceeLambda container reuseIn high traffic environments lambda reuses the same container to serve multiple requests. The lambdaTrouble with Vercel and deployment URLHey I've been having a problem with nextjs deploying to vercel. In localhost the calls to the backen