1.1.4 • Published 2 years ago

smoothly-request v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Build Status Dependencies devDependencies install size npm version

Smoothly request

Perform request with promise based client on NodeJS

Smoothly request enables developer to send request with promise based client on NodeJS. The package generally was designed for cloud functions (aws lambda, google functions etc.), and it has a little unpacked size.

Installing

Using npm:

$ npm install smoothly-request

Example

Performing a GET request

const smoothlyRequest = require('smoothly-request');

(async () => {
  const result = await smoothlyRequest({
      hostname: `https://ahmetonursolmaz.com.tr`,
      path: '/users/2',
      method: 'GET'
  });
})();

Performing a POST request

const smoothlyRequest = require('smoothly-request');

(async () => {
  const result = await smoothlyRequest({
      hostname: `https://ahmetonursolmaz.com.tr`,
      path: '/users',
      method: 'POST',
      payload: {},
  });
})();

Performing an another request

const smoothlyRequest = require('smoothly-request');

(async () => {
  const result = await smoothlyRequest({
      hostname: `https://ahmetonursolmaz.com.tr`,
      path: '/users/2',
      method: 'PATCH',
      payload: {},
  });
})();


(async () => {
    const result = await smoothlyRequest({
        hostname: `https://ahmetonursolmaz.com.tr`,
        path: '/users/2',
        method: 'DELETE',
        payload: {},
    });
})();
1.1.4

2 years ago

1.1.3

2 years ago

1.1.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.1.2

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago