Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, January 10, 2018 7:16 AM
Hi,
I have a code for calling web method in ajax, but want to test it in POSTMAN please tell me how to pass these parameters in POSTMAN.
$.ajax({
type: "POST",
url: "/RAFL/FetchDetails",
dataType: "json",
contentType: "application/json",
data: JSON.stringify({
postData: '{"custId":"SKC400","data":"DS/go10ZWvcKm10JGxYrvZ4+dGOpR6eB=="}',
RollNumber: $('#txtRollNo').val(),
sendEmail: $('#chkEmail').is(':checked'),
AttemptsLeft: AttemptsLeft,
consentNote: 'I accept.' }),
success: function (data) {
alert('success');
},
error: function (error) {
alert('failure');
}
});
Please help!
All replies (2)
Wednesday, January 10, 2018 5:10 PM
Just check this video adapt your parameters respectively.
Thursday, January 11, 2018 2:26 AM
Hi shashikant2011,
want to test it in POSTMAN please tell me how to pass these parameters in POSTMAN
As we know, the jQuery code will be executed on client side when you browse the web page via browser, and the jQuery code will help find elements and get values (or property) and make request with data that you want to send to server. But Postman can not execute your jQuery, if you want to make a request to your service, you need to get elements’ value yourself, and then put the data in request body like below.
With Regards,
Fei Han