extend-ajax
Advanced tools
Comparing version 1.2.2 to 1.2.3
# Changes | ||
# 1.2.3 | ||
- Add an option: withCredentials | ||
# 1.2.2 | ||
@@ -4,0 +8,0 @@ |
@@ -0,0 +0,0 @@ var webpackConfig = require('./build/webpack.test.config'), |
{ | ||
"name": "extend-ajax", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "an AJAX request library", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -137,2 +137,3 @@ # extend-ajax | ||
- jsonpParma \<String> jsonp传输时回调函数的键名,default: 'callback' | ||
- withCredentials \<boolean> 是否允许ajax请求携带验证信息,例如:cookie. | ||
- dev \<Boolean> 默认值: false。如果为true,则环境就是development,否则为production。 | ||
@@ -139,0 +140,0 @@ - header \<object> 设置头信息。默认值: {'Content-Type': 'form', 'Accept': 'json'} |
@@ -140,2 +140,3 @@ # extend-ajax | ||
- dev \<Boolean> default: false, if true, current environment is development,or else it is production. | ||
- withCredentials \<Boolean> default: false, whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates | ||
- header \<object> set http header.default: {'Content-Type': 'form', 'Accept': 'json'} | ||
@@ -142,0 +143,0 @@ - Content-Type \<string> you can set: 'text', 'json', 'form'(default), 'formData', 'html' and standard content-type value |
@@ -549,2 +549,5 @@ (function (global, factory) { | ||
xhr.open(type, url, async); | ||
if (options.withCredentials) { | ||
xhr.withCredentials = true; | ||
} | ||
setHeader(xhr, options.header, options.charset); | ||
@@ -551,0 +554,0 @@ xhr.send(data); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
35011
637
195
9