MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / POST

Function POST

packages/nextjs/src/index.ts:38–54  ·  view source on GitHub ↗
(req: Request)

Source from the content-addressed store, hash-verified

36
37export function createAppRoute(client: TriggerClient) {
38 const POST = async function handler(req: Request) {
39 const response = await client.handleRequest(req);
40
41 if (!response) {
42 return new Response(JSON.stringify({ error: "Not found" }), {
43 status: 404,
44 headers: {
45 "Content-Type": "application/json",
46 },
47 });
48 }
49
50 return new Response(JSON.stringify(response.body), {
51 status: response.status,
52 headers: response.headers,
53 });
54 };
55
56 return {
57 POST,

Callers

nothing calls this directly

Calls 1

handleRequestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…