Adding HTTP codes and JSON in response