Add content for making API calls using http moduel

pull/3326/head
Kamran Ahmed 2 years ago
parent 231e295f01
commit 89a436a5b7
  1. 10
      contributing.md
  2. 13
      src/roadmaps/nodejs/content/107-nodejs-apis/107-api-calls-http.md

@ -3,10 +3,10 @@
First of all thank you for considering to contribute. Please look at the details below: First of all thank you for considering to contribute. Please look at the details below:
- [Contribution](#contribution) - [Contribution](#contribution)
- [New Roadmaps](#new-roadmaps) - [New Roadmaps](#new-roadmaps)
- [Existing Roadmaps](#existing-roadmaps) - [Existing Roadmaps](#existing-roadmaps)
- [Adding Content](#adding-content) - [Adding Content](#adding-content)
- [Guidelines](#guidelines) - [Guidelines](#guidelines)
## New Roadmaps ## New Roadmaps
@ -23,7 +23,7 @@ For the existing roadmaps, please follow the details listed for the nature of co
## Adding Content ## Adding Content
Find [the content directory inside the relevant roadmap](https://github.com/kamranahmedse/roadmap-astro/tree/master/src/roadmaps). Please keep the following guidelines in mind when submitting content: Find [the content directory inside the relevant roadmap](https://github.com/kamranahmedse/developer-roadmap/tree/master/src/roadmaps). Please keep the following guidelines in mind when submitting content:
- Content must be in English. - Content must be in English.
- Put a brief description about the topic on top of the file and the a list of links below with each link having title of the URL. - Put a brief description about the topic on top of the file and the a list of links below with each link having title of the URL.

@ -1 +1,12 @@
# Api calls http # Making API calls with HTTP
You can make API calls using the `http` module in Node.js as well. Here are the two methods that you can use:
- `http.get()` - Make http GET requests.
- `http.request()` - Similar to `http.get()` but enables sending other types of http requests (GET requests inclusive).
Visit the following resources to learn more:
* [Node.js `http.get()` documentaion](https://nodejs.org/docs/latest-v16.x/api/http.html#httpgeturl-options-callback)
* [Node `http.request()` documentaion](https://nodejs.org/docs/latest-v16.x/api/http.html#httprequesturl-options-callback)
* [How To Create an HTTP Client with Core HTTP in Node.js](https://www.digitalocean.com/community/tutorials/how-to-create-an-http-client-with-core-http-in-node-js)
Loading…
Cancel
Save