Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
vue-resource
Advanced tools
Resource plugin for Vue.js (v0.11).
The plugin provides services for making web requests and handle responses using a XMLHttpRequest or JSONP.
The http service can be used globally Vue.http
or in a Vue instance this.$http
.
List of methods:
Vue.http.get(url, [data], [success], [options])
Vue.http.post(url, [data], [success], [options])
Vue.http.put(url, [data], [success], [options])
Vue.http.patch(url, [data], [success], [options])
Vue.http.delete(url, [data], [success], [options])
Vue.http.jsonp(url, [data], [success], [options])
new Vue({
ready: function() {
// GET request
this.$http.get('/someUrl', function (data, status, request) {
// set data on vm
this.$set('someData', data)
}).error(function (data, status, request) {
// handle error
})
}
})
The resource service can be used globally Vue.resource
or in a Vue instance this.$resource
.
List of methods:
Vue.resource(url, [params], [actions])
List of default actions:
get: {method: 'GET'},
save: {method: 'POST'},
query: {method: 'GET'},
remove: {method: 'DELETE'},
delete: {method: 'DELETE'}
new Vue({
ready: function() {
var resource = this.$resource('someItem/:id');
// get item
resource.get({id: 1}, function (item, status, request) {
this.$set('item', item)
})
// save item
resource.save({id: 1}, {item: this.item}, function (data, status, request) {
// handle success
}).error(function (data, status, request) {
// handle error
})
// delete item
resource.delete({id: 1}, function (data, status, request) {
// handle success
}).error(function (data, status, request) {
// handle error
})
}
})
FAQs
The HTTP client for Vue.js
The npm package vue-resource receives a total of 55,261 weekly downloads. As such, vue-resource popularity was classified as popular.
We found that vue-resource demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.