
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Ndume is a JavaScript class designed to simplify API calls using the fetch method. It provides a convenient way to make HTTP requests with support for various HTTP methods, request headers, and request body formats.
Ndume is a JavaScript class designed to simplify API calls using the fetch method. It provides a convenient way to make HTTP requests with support for various HTTP methods, request headers, and request body formats.
Install the Ndume package using npm:
npm install ndume
## Usage
const Ndume = require('ndume');
// Create an instance of Ndume with the base API route
const api = new Ndume('https://api.example.com');
// Set an authorization token if required
api.setToken({
type: 'Bearer',
token: 'your_access_token',
});
// Make a GET request
api.GET('/endpoint')
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
new Ndume(baseRoute: string) Creates a new instance of Ndume with the specified base route.
setToken(token: { type: string, token: string }) Sets the authorization token for the requests.
BaseRequest(method: string, bodyType: string, body: any, path: string, params: Object): Promise Performs a basic request using the fetch method. Returns a Promise containing the fetch request response.
BodyTreatMent(body: any, bodyType: string): Promise Formats the request body to the proper format. Returns a Promise containing the formatted request body.
ParamThreatMent(params: Object): string Formats request parameters to a query string. Returns the formatted parameter string.
POST(body: any, bodyType: string, path: string, params: Object): Promise Performs a POST request. Returns a Promise containing the POST request response.
PUT(body: any, bodyType: string, path: string, params: Object): Promise Performs a PUT request. Returns a Promise containing the PUT request response.
GET(path: string, params: Object): Promise Performs a GET request. Returns a Promise containing the GET request response.
DELETE(path: string, params: Object): Promise Performs a DELETE request. Returns a Promise containing the DELETE request response.
PATCH(body: any, bodyType: string, path: string, params: Object): Promise Performs a PATCH request. Returns a Promise containing the PATCH request response.
Fique à vontade para contribuir para este projeto. Veja o arquivo CONTRIBUTING.md para obter detalhes.
FAQs
Ndume is a JavaScript class designed to simplify API calls using the fetch method. It provides a convenient way to make HTTP requests with support for various HTTP methods, request headers, and request body formats.
We found that ndume demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.