Requests that include slashes fail to output with directory not found
Requests that include slashes fail to output with directory not found Example Request URI: https://{{host}}:9999/pf-admin-api/v1/authenticationApi/settings
Image from Postman
Node output
$ node script.js
ResponsesToFile App is listening now! Send them requests my way!
Data is being stored at location: C:\Users\Kevin\ResponseToFile-Postman\Responses
{ Error: ENOENT: no such file or directory, open 'C:\Users\Kevin\ResponseToFile-Postman\Responses\authenticationApi\sett
ingswaddup.json'
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\Users\Kevin\ResponseToFile-Postman\Responses\authenticationApi\settingswaddup.json' }
{ Error: ENOENT: no such file or directory, open 'C:\Users\Kevin\ResponseToFile-Postman\Responses\authenticationApi\appl
icationswaddup.json'
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\Users\Kevin\ResponseToFile-Postman\Responses\authenticationApi\applicationswaddup.json' }
{ Error: ENOENT: no such file or directory, open 'C:\Users\Kevin\ResponseToFile-Postman\Responses\authenticationPolicies
\settingswaddup.json'
errno: -4058,
code: 'ENOENT',
syscall: 'open',
JSON.stringify(req.body) should fix the issue in the main function that collects and creates file.