Hi @m_menon,
result.status_code has the HTTP Status code, you can use it wherever you want, inside script.
You can return your own status code, if you think it suits better.
If you use "return" statement the status code will be 200 by default. Since DF2.1 you can set your status code and content type, so there is no need to keep using "return".