ResponseToFile-Postman icon indicating copy to clipboard operation
ResponseToFile-Postman copied to clipboard

Requests that include slashes fail to output with directory not found

Open rtfmoz2 opened this issue 5 years ago • 1 comments

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 api-calls

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',

rtfmoz2 avatar Nov 24 '20 12:11 rtfmoz2

JSON.stringify(req.body) should fix the issue in the main function that collects and creates file.

SAPHemlock avatar Jun 28 '22 22:06 SAPHemlock