Hi Chiranjit,
Could you try the below highlighted code changes in your implementation?
"
$(document).ready(function() {
var xyz = '" + Var1 + "';
$.ajax({
url: 'https://...../test25/rest/RESTAPI2/RESTAPIMethod1',
dataType: 'json',
type: 'POST',
contentType: 'application/json',
data: JSON.stringify({
'Attribute1': xyz
}),
success: function(response) {
$('.js_test_inpt').val(response.Attribute1);
$('.js_link').click();
console.log(response); //output
}
});
});
"
I hope this helps you!
Kind regards,
Benjith Sam