Text Summarization

FREEMIUM
By TextMiner | Updated 16 दिन पहले | Data
Popularity

9.7 / 10

Latency

393ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Can I make an ajax call to the api developing Chrome Extension and get the same json response

Rapid account: Aniquedavla
aniquedavla
8 वर्ष पहले

I am developing a chrome extension to summarize articles with url links to news article.
I am not using unirest or any of the languages for which the example are called.
I am using a simple ajax call that send the html form data( the sentum , and url) to the api, the url shows unsessfull every time. The request gets cancelled.
Here is my js:

$(function() {
var $addSummary = $(’#summary’);
var $senten = $(’#numberofSentences’);
var $urlT = $(’#feed_url’);
$(’#data’).submit(function() {
var requestSummary = {
“X-Mashape-Key”:“CGp60L3DxfmshySTedqMew6HxqXpp1RW8nHjsnLrto8lHz6WK3”,
“Content-Type”: “application/x-www-form-urlencoded”,
“Accept”: “application/json”,
“sentnum”: $senten.val(),
“url”: $urlT.val(),
}
$.ajax({
type : ‘POST’,
url : ‘https://textanalysis-text-summarization.p.mashape.com/text-summarizer-url’,
data : requestSummary,
success:function(newSentences) {
$addSummary.append(‘Summary:’+ newSentence.sentences);

		},
		error:function(){
			alert("NOT Summarizing, check the url or the internet!")
		}
	}); 
});

});

Rapid account: Textanalysis
textanalysis Commented 8 वर्ष पहले

sorry, cannot help you for this

Join in the discussion - add comment below:

Login / Signup to post new comments