Skip to content

[Not error] Invalid property length of this._request #47

Description

@awwit

var reqOpts = {
url: this._endpoint,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': this._request.length
},
json: true,
timeout: config.timeout,
body: this._request
};

this._request is JS Object. It does not contain a length property.

These lines of code can be removed, since they do not affect anything:

headers: {
'Content-Type': 'application/json',
'Content-Length': this._request.length
},

Proof in the request docs:
https://github.com/request/request#requestoptions-callback

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions