Updated with "setJsonHeaders" and "setStatusCode" methods.