Request Body :
req.setBody('{"username":' + name +',"password":' + passEncoded + ',"Status":' + Status+ ',"stageFlag":' + stageFlag + ',"result":' + parama +'}');
Output of above JSON request Request :
{"username":"p8admin","password":"cDhhZG1pbg==","Status":"Accepted","stageFlag":"lead","result":[{"attributes":{"type":"Lead","url":"/services/data/v35.0/sobjects/Lead/00Qf000000AtPfREAV"},"Lead_Id__c":"9992870075033224","IdentityProof__c":"Adhaar card","IdentityProofNo__c":"100800833424","Identity_Proofs__c":"Voter Identity Card","Identity_ProofNo__c":"THH0033325","Id":"00Qf000000AtPfREAV"},{"attributes":{"type":"Lead","url":"/services/data/v35.0/sobjects/Lead/00Qf000000AtPfSEAV"},"Lead_Id__c":"9992870075033226","IdentityProof__c":"Adhaar card","IdentityProofNo__c":"100800833426","Identity_Proofs__c":"Voter Identity Card","Identity_ProofNo__c":"THH0033327","Id":"00Qf000000AtPfSEAV"}]}
Even you can check your request in JSON format Validator :
https://jsonformatter.curiousconcept.com/
Validator Screen shot FYR :
req.setBody('{"username":' + name +',"password":' + passEncoded + ',"Status":' + Status+ ',"stageFlag":' + stageFlag + ',"result":' + parama +'}');
Output of above JSON request Request :
Even you can check your request in JSON format Validator :
Validator Screen shot FYR :
No comments:
Post a Comment