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})
}`
הצטרף לדיון - הוסף תגובה למטה:
another thought: is x-rapidapi-key valid?
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