I’m trying to send data to a web service using jQuery’s post() command – I’m getting a successful response back, I think, but I’m not sure what to use to refer to the data that is returned. Here’s my code:
var insertResponse = $.post(
"https://xxx.com/spark_submit.aspx",
{
NameFirst: "Joe",
NameLast: "Schmoe",
PostalCode: "11211",
EmailAddress: "joe@schmoe.com",
Survey: "76:1139"
},
function() {
console.log(insertResponse);
}).error(function() {
console.log("error");
}
);
The insertResponse just returns a massive object including all data related to the processing of the response. I just want the XML that’s returned. How can I retrieve it?
1 Answer