Chuck Norris

FREE
By matchilling
Updated 5 months ago
Social
9.4/10
Popularity Score
336ms
Latency
98%
Success Rate
Discussions
Hi Developer, feel free to ask your question:
themsleeves:7 months ago
0 Answers

502 gateway, it stopped working

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.get("https://matchilling-chuck-norris-jokes-v1.p.rapidapi.com/jokes/random")
.header("X-RapidAPI-Host", "matchilling-chuck-norris-jokes-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("accept", "application/json")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication