gabyrdzlobaton
07/18/2022, 9:04 PMfunction callRestlet(body, script, deploy){
var myRestletResponse = https.requestRestlet({
body: 'My Restlet body',
deploymentId: deploy,
headers: myRestletHeaders,
scriptId: script
});
var myRestletHeaders = {
myHeaderType: 'Test',
myHeaderStuff: 'This is my header',
myHeaderId: 7
};
var myUrlParameters = {
myFirstParameter: 'firstparam',
mySecondParameter: 'secondparam'
}
var myRestletResponse = https.requestRestlet({
body: 'My Restlet body',
deploymentId: deploy,
headers: myRestletHeaders,
method: 'GET',
scriptId: script,
urlparams: myUrlParameters
});
}
This is the doGet function on the Restlet:
function doGet(context) {
log.debug('doGet', '*** START ***');
log.debug('doGet', 'context = ' + JSON.stringify(context));
let response = '';
try {
return JSON.stringify(context);
} catch (e) {
return createErrorResponse({
error: e.message,
message: e
});
}
}
And this how the logs look like:
Any idea why I'm not getting anything in the context?battk
07/18/2022, 9:34 PMbattk
07/18/2022, 9:35 PMbattk
07/18/2022, 9:36 PMbattk
07/18/2022, 9:36 PMbattk
07/18/2022, 9:37 PMgabyrdzlobaton
07/18/2022, 9:46 PMfunction callRestlet(body, script, deploy){
var myUrlParameters = {
myFirstParameter: 'firstparam',
mySecondParameter: 'secondparam'
}
var myRestletResponse = https.requestRestlet({
deploymentId: deploy,
method: 'GET',
scriptId: script,
urlparams: myUrlParameters
});
}
battk
07/18/2022, 9:47 PMbattk
07/18/2022, 9:47 PMZoran R-DATAGRAM
07/19/2022, 10:30 AMgabyrdzlobaton
07/19/2022, 3:55 PMgabyrdzlobaton
07/19/2022, 3:58 PM