constructor(url, params, callback) {
        super();
        this._url = url;
        this._accessKey = params.accessKey;
        this._secretKey = params.secretKey;
        this._httpParams = params;
        this._callback = callback;

        this._httpRequest = null;
        this._timestamp = null;
        this._signingKey = null;
        this._chunkedUpload = false;
        this._lastSignature = null;

        this.once('finish', () => {
            if (!this._httpRequest) {
                this._initiateRequest(false);
            }
            if (this._chunkedUpload) {
                this._httpRequest.end(this.constructChunkPayload(''));
            } else {
                this._httpRequest.end();
            }
        });
    }
@constructor
@param {string} url - HTTP URL to the S3 server
@param {object} params - request parameters
@param {string} params.accessKey - AWS access key
@param {string} params.secretKey - AWS secret key
@param {string} [params.method="GET"] - HTTP method
@param {object} [params.headers] - HTTP request headers
example: {
    'connection': 'keep-alive',
    'content-length': 1000, // mandatory for PUT object requests
    'x-amz-content-sha256': '...' // streaming V4 encoding is used
                                  // if not provided
}
@param {function} callback - called when a response arrives:
callback(res) (see http.request())