Added emit statusCode

When you are streaming using the stream api there is no way to know the statusCode.
I added an emit to know it before you start streaming/etc...