Back

[SOLVED] is res.json always 200 status?

  • 0
  • Self Hosted
Mosh Ontong
17 Nov, 2023, 04:17

I want to send another code, do I need to use the res.send? then as content-type is application.json?

TL;DR
User asked if res.json always returns a 200 status code. Steve confirmed that the status code needs to be passed as part of res.send or res.json. If the user wants to send a different code, they can use res.send and set the content-type as application.json.
Drake
17 Nov, 2023, 04:21

Yes, you need pass the status code as part of res.send or res.json

Mosh Ontong
17 Nov, 2023, 04:23

thanks steve

Guille
17 Nov, 2023, 16:40

[SOLVED] is res.json always 200 status?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more