I'm trying to use a postURL in a function I created in the CRM. I want to see the HTTP response code and text for the API postURL call to my 3rd party vendor. How can this be accomplished? Thank you in advanced!
//Gets zoho merchant id field from the lead record
leadrecord = zoho.crm.getRecordById("Leads",leadid);
recordid = leadrecord.get("id");
//Get lead data
zoho_firstname = leadrecord.get("First_Name");
zoho_lastname = leadrecord.get("Last_Name");
zoho_email = leadrecord.get("Email");
zoho_phone = leadrecord.get("Phone");
zoho_title = leadrecord.get("Title");
zoho_description = leadrecord.get("Description");
//Map Payment Cloud Authorization Key
apikey = Map();
apikey.put("Authorization","Bearer XXXXXXXXXXX");
//Map lead data for post payload
payload_map = Map();
payload_map.put("description",zoho_description);
payload_map.put("first-name",zoho_firstname);
payload_map.put("last-name",zoho_lastname);
payload_map.put("email",zoho_email);
payload_map.put("phone",zoho_phone);
payload_map.put("title",zoho_title);
//Post to API