Answer the question
In order to leave comments, you need to log in
Using PasteBin API in Javascript?
I need to send the code to PasteBin via their Api, this is how I do it
$.ajax({
url: "http://pastebin.com/api/api_post.php",
type: "POST",
dataType: "JSONP",
data: {
"api_dev_key": "9c3ccefe915590a6fd979be4f2a54f27",
"api_option": "paste",
"api_paste_code": "blah blah",
"api_paste_expire_date":"10M",
"api_paste_private":"0"
},
success: function(res) {
console.log(res);
},
error: function(res) {
console.log("Error");
}
});
Answer the question
In order to leave comments, you need to log in
What for a zero and in general numbers to wrap in inverted commas?
"api_paste_private": 0 - try this, maybe that's the issue! Yes, that's not the point.
In general, how can chrome swear at the js syntax, if it is an Ayak request, but it is in js?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question