FaceRect

FREE
By apicloud
Updated a month ago
Media
9.2/10
Popularity Score
2241ms
Latency
97%
Success Rate
plackr5 years ago
python sample code returns TypeErrorPython 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import unirest >>> response = unirest.get( ... "https://apicloud-facerect.p.mashape.com/process-url.json?url=http%3A%2F%2Fapicloud.me%2Fassets%2Ffacerect%2Fimage1.jpg&features=false", ... { ... "X-Mashape-Authorization": "bZqJj1YdVP2bLSNa8zY30vvuucRC30sx" ... } ... ); Traceback (most recent call last): File "<stdin>", line 4, in <module> TypeError: get() takes exactly 1 argument (2 given)
apicloud5 years ago
Hi there! Thanks for you interest in our API! Probably you have already solved the problem, but we'll post this comment anyway in case anybody else will face the same issue: Unfortunately, sample code snippets are generated automatically by Mashape and are currently outdated. The correct snippet should look like this: import unirest response = unirest.get( "https://apicloud-facerect.p.mashape.com/process-url.json?url=http%3A%2F%2Fapicloud.me%2Fassets%2Ffacerect%2Fimage1.jpg&features=false", headers = { "X-Mashape-Authorization": "<Your Auth Key>" } ); For the most recent docs on Unirest-Python please visit https://github.com/mashape/unirest-python Hope that helps!
Hi Developer, feel free to post your answer:

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://apicloud-facerect.p.rapidapi.com/process-file.json")
.header("X-RapidAPI-Host", "apicloud-facerect.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication