Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@gwansikk/query-fetch
Advanced tools
Lightweight and Easy-to-Use Fetch API Extension Library
The Fetch API often lacks necessary features, requiring direct implementation. You have to handle retries on failure, token renewal, request and response logging, request cancellation, and more on your own. Additionally, you often need to repeat the same configurations for every request.
Moreover, dealing with Promise objects can be quite challenging. Using Promises for asynchronous processing can lead to complex structures and difficult error handling. Managing multiple asynchronous requests sequentially or in parallel can reduce code readability and maintainability.
To address these issues, Query Fetch was created. It alleviates the burden of network communication, allowing you to focus on your core logic!
Query Fetch is available on npm. You can install it using the following commands.
npm i @gwansikk/query-fetch
pnpm add @gwansikk/query-fetch
yarn add @gwansikk/query-fetch
[!IMPORTANT]
Query Fetch is currently in development. The provided API is subject to change.
const queryFetch = createQueryFetch({
baseURL: 'https://jsonplaceholder.typicode.com',
});
queryFetch.get({ endpoint: ['posts', 1] }).then((data) => console.log(data));
const queryFetch = createQueryFetch({
baseURL: 'https://jsonplaceholder.typicode.com',
interceptors: {
request: (request) => {
console.log('** request interceptor **');
// Modify and return the request.
// For example, you can add specific headers or modify the URL.
request.headers = {
...request.headers,
Authorization: 'Bearer YOUR_ACCESS_TOKEN',
};
return request;
},
response: (response) => {
console.log('** response interceptor **');
// Modify and return the response.
return response;
},
error: (response) => {
console.log('** error interceptor **');
// Modify and return the error response.
return response;
},
},
});
queryFetch.get({ endpoint: ['posts', 1] }).then((data) => console.log(data));
Here is the roadmap for the official release (v1.0.0).
We welcome contribution from everyone in the community. Read below for detailed contribution guide.
For more details, please refer to the LICENSE.
MIT © gwansikk
FAQs
Lightweight and Easy-to-Use Fetch API Extension Library
The npm package @gwansikk/query-fetch receives a total of 0 weekly downloads. As such, @gwansikk/query-fetch popularity was classified as not popular.
We found that @gwansikk/query-fetch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.