Sign Up

Log In

Text-Processing

FREEMIUM
By japerk
Updated 2 months ago
Other
9.5/10
Popularity Score
292ms
Latency
34%
Success Rate
rtanaka5 years ago
node js unirest example didn't work for methe site shows this code: var Request = unirest.post("https://japerk-text-processing.p.mashape.com/sentiment/") .headers({ "X-Mashape-Authorization": "k9PR69i7skxNIMu1ULGbHZ3b3d4QlhB7" }) .send({ "text": "great movie", "language": "english" }) .end(function (response) { console.log(response); }); i had to change the send portion to .send('text=great movie') to get it to work.
nijikokun5 years ago
Yes, japerk only accepts `application/form-url-encoded` where unirest-nodejs by default sends objects as `application/json` I'm trying to think of a method that doesn't break hundreds of other apis and existing implementations using unirest.
japerk5 years ago
Thanks
nijikokun5 years ago
I've updated unirest-nodejs to support sending FORM unless stated otherwise through usage of .type (Still unsure if this was the best action, as I cannot be sure that ALL apis support solely FORM or solely JSON or a mixture of both, changing unirest is easier than risking breaking code for tons of apis.
japerk5 years ago
Thanks, I've alerted Mashape support.
japerk5 years ago
Thanks, I've alerted Mashape support.
Hi Developer, feel free to post your answer:
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://japerk-text-processing.p.rapidapi.com/phrases/")
.header("X-RapidAPI-Host", "undefined")
.header("X-RapidAPI-Key", "undefined")
.header("Content-Type", "application/x-www-form-urlencoded")
.send("language=undefined")
.send("text=<required>")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication

Sign up for free

to test this endpoint

Join the world’s largest API marketplace with over half a million developers and thousands of APIs.
DiscoverAPIs
Testfrom the browser
Connectusing code snippets
Managefrom one dashboard