Profanity & Toxicity Detection for User-Generated Content

FREEMIUM
От CognitiveAPIs | Обновлено 4 days ago | Text Analysis
Популярность

8.5 / 10

Задержка

401ms

Уровень обслуживания

100%

Health Check

N/A

Назад ко всем обсуждениям

Cannot get it to work

Rapid account: Travbrad
travbrad
3 years ago

Hello,

I’m really not able to get this API to work. I’ve copied the request from the example and I always seem to get this result:

error: “INPUT POST text, title, positives, negatives are empty”

I’m running a basic type script http post:

`let data = new FormData();
data.append(
‘text’,
‘You idiot! I will find where you live and kick you ass!’
);

let headers = new HttpHeaders({
  'content-type': 'application/x-www-form-urlencoded',
  'x-rapidapi-key': '42ccdd7f41msh80a38d28062bbc9p163f70jsn4cabbf4a5744',
  'x-rapidapi-host':
    'profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com',
});


return this.http.post('https://profanity-toxicity-detection-for-user-generated-content.p.rapidapi.com/', data, { headers: headers})

}`

Rapid account: Unicorn NLP
unicornNLP Commented 3 years ago

another thought: is x-rapidapi-key valid?

Rapid account: Unicorn NLP
unicornNLP Commented 3 years ago

Hello,
the problem is that API is giving back message that all the input fields are empty. So I am guessing there is some problem with defining or sending the ‘text’ variable.
I do not know what is the exact syntax of the code that you pasted but shouldn’t there be ‘text‘:‘You idiot! I will find where you live and kick you ass!’ (so : instead of coma) or some other definition of the ‘text’ variable?
I am online for the next 8 hours so please write how it goes and did it resolve anything.
Best,
Tom

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии