Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
digit-fetchy
Advanced tools
Readme
Simple HTTP package using the new Fetch API.
All responses default to JSON unless specified otherwise
git clone https://github.com/vjrngn/fetchy/
npm install 'digit-fetchy'
In any file :
var http = require('digit-fetchy');
Simple GET request with default headers
http.get('some/url/here.com')
.then(response => {
console.log(response);
})
.catch(errors => {
console.log(errors)
});
GET request with custom headers
let headers = {
'Accept': 'application/json',
'x-custom-header': 'foo'
};
http.get('some/url/here.com', headers)
.then(response => {
// json response here.
})
.catch(errors => {
// any errors here
});
Simple POST request with default headers
let data = {
name: 'John',
password: 'foobar'
};
http.post('some/url/here.com', data)
.then(response => {
// json response here
})
.catch(errors => {
// any errors here
});
POST request with custom headers
let data = {
name: 'John',
password: 'foobar'
};
let headers = {
'x-foo': 'bar'
};
http.post('some/url/here.com', data, headers)
.then(response => {
// json response here
})
.catch(errors => {
// any errors here
});
let data = {
name: 'John',
password: 'foobar'
};
let headers = {
'x-foo': 'bar'
};
http.put('some/url/here.com', data, headers)
.then(response => {
// json response here
})
.catch(errors => {
// any errors here
});
Request Options | Description | Values |
---|---|---|
mode | The mode contains the mode of the request (e.g., cors, no-cors, cors-with-forced-preflight, same-origin.) This is used to determine if cross-origin requests lead to valid responses, and which properties of the response are readable | same-origin, no-cors, cors (default) |
credentials | Indicates whether the user agent (browser) should send cookies from the other domain in the case of cross-origin requests. This is similar to XHR’s withCredentials flag, but with three available values (instead of two). | omit, same-origin, include (default) |
cache | Indicates the cache mode of the request. | default (default), no-store , reload, no-cache, force-cache |
FAQs
Simple HTTP package using the new Fetch API.
The npm package digit-fetchy receives a total of 5 weekly downloads. As such, digit-fetchy popularity was classified as not popular.
We found that digit-fetchy 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.