Skip to content

The `http-easy` package provides a lightweight and intuitive API for making HTTP requests in Node.js applications. It abstracts away the complexities of the HTTP protocol, offering simplified methods for common HTTP operations like GET, POST, PUT, DELETE, and more

License

Notifications You must be signed in to change notification settings

aliezzahn/http-easy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-easy

npm version License

http-easy is a lightweight Node.js package that simplifies making HTTP requests with ease.

Features

  • Promise-based: Uses Promises for handling asynchronous operations, allowing for easy chaining and error handling.
  • Flexible Configuration: Ability to configure request headers, timeouts, and other options.
  • Error Handling: Comprehensive error handling with meaningful error messages.
  • Support for Common HTTP Methods: GET, POST, PUT, DELETE, etc.
  • Support for Query Parameters and Request Body: Convenient methods for adding query parameters and request body data.
  • Interceptors: Middleware-like functionality for intercepting and modifying requests and responses.

Installation

npm install http-easy

Usage

const HttpEasy = require('http-easy');

const http = new HttpEasy();

// Making a GET request
http.get('https://jsonplaceholder.typicode.com/posts/1')
    .then(response => {
        console.log(response);
    })
    .catch(error => {
        console.error(error);
    });

For more examples and detailed usage, please refer to the documentation.

Documentation

For the full API documentation and usage examples, please refer to the documentation.

Contributing

Contributions are welcome! Please feel free to open an issue or submit a pull request for any feature or bug fix.

License

http-easy is licensed under the Apache License 2.0. See the LICENSE file for details.

About

The `http-easy` package provides a lightweight and intuitive API for making HTTP requests in Node.js applications. It abstracts away the complexities of the HTTP protocol, offering simplified methods for common HTTP operations like GET, POST, PUT, DELETE, and more

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published