The RapidAPI Developer Hub

Welcome to the RapidAPI developer hub. You'll find comprehensive guides and documentation to help you start working with RapidAPI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Native (HTTPS)

Installing & Making a Request

Since HTTPS is a module in the standard library for Node.js, there's no need to install an external dependancy to make a request with HTTPS. Simply create a new instance of the module and format the request.

var qs = require("querystring");
var http = require("https");

var options = {
	"method": "{{HTTP_METHOD}}",
	"hostname": "{{API_URL}}",
	"path": "{{API_PATH}}",
	"headers": {
		"x-rapidapi-key": "{{API_KEY}}",
	}
};

var req = http.request(options, function (res) {
	var chunks = [];

	res.on("data", function (chunk) {
		chunks.push(chunk);
	});

	res.on("end", function () {
		var body = Buffer.concat(chunks);
		console.log(body.toString());
	});
});

req.write(qs.stringify({}));
req.end();

Updated 3 months ago

Native (HTTPS)


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.