Text Summarization

FREEMIUM
(Ким) TextMiner | Оновлено месяц назад | Data
Популярність

9.6 / 10

Затримки

394ms

Рівень обслуговування

100%

Health Check

N/A

Повернутися до всіх обговорень

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

Приєднуйтесь до обговорення — додайте повідомлення нижче:

Вхід / Реєстрація, щоб публікувати нові повідомлення