https://github.com/aliezzahn/http-easy
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
https://github.com/aliezzahn/http-easy
nodejs
Last synced: 3 months ago
JSON representation
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
- Host: GitHub
- URL: https://github.com/aliezzahn/http-easy
- Owner: aliezzahn
- License: apache-2.0
- Created: 2024-06-10T04:27:04.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-10T05:19:49.000Z (11 months ago)
- Last Synced: 2025-02-22T16:38:55.246Z (3 months ago)
- Topics: nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/http-easy
- Size: 7.81 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-easy
[](https://badge.fury.io/js/http-easy)
[](https://opensource.org/licenses/Apache-2.0)`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
```bash
npm install http-easy
```## Usage
```javascript
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](LICENSE) file for details.