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
Sandvich
Sandvich40d 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
Sandvich40d ago
No description
No description
Rasel Hossain
Rasel Hossain37d ago
thanks Sandvich
Rasel Hossain
Rasel Hossain37d 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 Hossain37d ago
@Sandvich
Sandvich
Sandvich37d ago
No idea what Qstash is or how it works. Probably best reading their documentation
Rasel Hossain
Rasel Hossain37d 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 backen1 trpc api server for 1 or many clients.I'm a beginner, working on two monorepo projects that resides on the same folder, each of which withError formatting with trpcExpress.createExpressMiddlewareI'm trying to figure out how to do error formatting but it's unclear how to do it in the context of Tried to access "$types.prototype" which is not available at runtimeIm getting this weird errors every thing was good until I migrated to trpc 11 which for some reason type safety with metahow do I get the meta types to work correctly?Confused by the many examples and docs of implementing trpc, next.js (app router), and clerk.To show an examples of the many variants an implementations here is an example: In TRPC Docs: httpTypeError: cache is not a functionTrying to run vitest integration testing on a procedure but i keep running into errors with a "cacheCan't throw errorMy request is pending although throw new TRPCError() executed. Something wrong here?How to use `getQueryKey` from the server side?Hi guys, i cannot figure out how to use `getQueryKey` from the server side. Is this possible? The ukeep previous dataTrpc 11 (trpc@next) doesn’t have support for keepPreviousData? I’m trying to useQuery with keepPreviContext with trpc ws clientHello! I've implemented trpc to my nextjs 14 app router project, along with trpc socket subscription