Hi,
I’m trying to do an HTTP Post Request. I usually do this using ajax by:
var formData = new FormData();
formData.append("key1", "value1");
$.ajax({
type : "POST",
url : "https://myurlhere.com/api/myphp.php",
dataType: "text",
cache: false,
contentType: false,
processData: false,
data: formData,
success: function(result) {
console.log(result);
}
});
How do I translate this ajax code to pc.http (passing with settings and data)
pc.http.post("https://myurlhere.com/api/myphp.php", function(err, result) {
console.log(result);
});