I'm trying to post this json but not working what'...
# general
t
I'm trying to post this json but not working what's going wrong here?
b
not working is not good enough
expect to explain whats wrong, ideally with enough detail for someone to reproduce the problem
t
b
still not enough detail
i dont even know whats wrong, for all i know it could be that your font's color is not to your liking
you are missing important things like what error message you are getting
or what behavior you are seeing instead of what you expect
t
Passing this json obj with https post method to the suitelet var files = { "csvfile": { "*name*":fileObj.name, "folder": fileObj.folder } var response = https.post({ url: 'abc.com', headers: headers, body:JSON.stringify(files), }); Now in suitelet i'm trying get value of name key request.files.csvfile.name Error: TypeError: Cannot read property 'name' of undefined [at Object.saveToCabinet (/SuiteBundles/Bundle 414815/src/su/fam_su_importcsv.js6213)]
b
ServerRequest.files is used when using
multipart/form-data
as the content type
it looks like you are using json, which is not multipart form data
use ServerRequest.body instead