Function buildResponse

  • Builds a standard HTTP response for API routes.

    Parameters

    • __namedParameters: {
          contentType?: string;
          data: unknown;
          response: { headers?: Record<string, string>; httpStatus: number };
      }

    Returns NextResponse

    A Next.js NextResponse object with the formatted body and headers.