Restore response.headers after synchronous request.
Enabled to pass Stream object as data.
Use Buffer.byteLength only if data is a string object.

If not a string object, expect that data has a length attribute.