Created
May 9, 2019 08:14
-
-
Save trungpv1601/2b744cabc9f9be094a587a2091eb7d5e to your computer and use it in GitHub Desktop.
Netsuite Restlet sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*@NApiVersion 2.x | |
*@NScriptType Restlet | |
*/ | |
define( | |
[ | |
'N/search', | |
'N/record', | |
'N/cache', | |
'N/format' | |
], | |
function (search, record, cache, fmt) { | |
function get (context) { | |
try { | |
return { test: 'Hello World' }; | |
} catch (err) { | |
log.audit({ | |
title: 'GET', | |
details: JSON.stringify(err) | |
}); | |
return err; | |
} | |
} | |
return { | |
get: get, | |
//delete: delete, | |
//post: post, | |
//put: put | |
}; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment