-
-
Notifications
You must be signed in to change notification settings - Fork 3
Methods
Fatih Koca edited this page Nov 27, 2019
·
1 revision
The HTTP method to use for the request (e.g. "get", "post", "put").
Default value is get.
Available methods: get, post, put, delete, patch, head, jsonp.
Vue.ajax({
url: "http://example.com",
method: "get"
});
// The shorthand method:
Vue.ajax.get("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "post"
});
// The shorthand method:
Vue.ajax.post("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "put"
});
// The shorthand method:
Vue.ajax.put("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "delete"
});
// The shorthand method:
Vue.ajax.delete("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "patch"
});
// The shorthand method:
Vue.ajax.patch("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "head"
});
// The shorthand method:
Vue.ajax.head("http://example.com", {});Vue.ajax({
url: "http://example.com",
method: "jsonp"
});
// The shorthand method:
Vue.ajax. jsonp("http://example.com", {});