Skip to content
Discussion options

You must be logged in to vote

Just use the new Response form:

For example for a 200,

export async function GET(request: Request) {
  return new Response('Hello, Next.js!', {
    status: 200,
  })
}

Or a 204:

export async function GET(request: Request) {
  return new Response(null, {
    status: 204,
  })
}

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@kmvan
Comment options

Comment options

You must be logged in to vote
9 replies
@homocodian
Comment options

@hakan-berat
Comment options

@homocodian
Comment options

@zecka
Comment options

@icyJoseph
Comment options

Answer selected by kmvan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants