You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
RequestPromiseResponse throws TypeError: res.body.replace is not a function. This happens when request is made with json: true, thus the retuned value is not json string but object.
To Reproduce
Send request with json: true, i.e: { method: 'GET', json: true, url: 'your-url', resolveWithFullResponse: true, simple: false}
* assert that response with expect(response).toSatisfyApiSpec()
Expected behavior
Handle json without throwing an error.
The problem is on line 7 in RequestPromiseResponse: this.body = res.body.replace(/"/g, '');
The text was updated successfully, but these errors were encountered:
Describe the bug
RequestPromiseResponse throws
TypeError: res.body.replace is not a function
. This happens when request is made withjson: true
, thus the retuned value is not json string but object.To Reproduce
json: true
, i.e:{ method: 'GET', json: true, url: 'your-url', resolveWithFullResponse: true, simple: false}
* assert that response with expect(response).toSatisfyApiSpec()
Expected behavior
Handle
json
without throwing an error.The problem is on line 7 in RequestPromiseResponse:
this.body = res.body.replace(/"/g, '');
The text was updated successfully, but these errors were encountered: