Skip to content

Commit

Permalink
Fix DEP0066: Do not access OutgoingMessage._headers when getHeaders()…
Browse files Browse the repository at this point in the history
… is available
  • Loading branch information
jmealo committed Sep 11, 2019
1 parent 40666d1 commit 3499e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function toCurl(platform) {
escapeString = platform === 'win' ? escapeStringWindows : escapeStringPosix,
requestMethod = 'GET',
data = [],
requestHeaders = this._headers,
requestHeaders = (typeof this.getHeaders === 'function') ? this.getHeaders() : this._headers,
requestBody = parseRequestBody(this._requestBody).toString(),
contentType = requestHeaders['content-type'];

Expand Down

0 comments on commit 3499e96

Please sign in to comment.