Skip to content

Commit

Permalink
支持跨域ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Oct 9, 2019
1 parent c13709d commit 358c277
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ const buildPromiseCommon = (asyncFunc, syncFunc, args) => {
}

export default {
/**
* 通过代理服务器模拟http请求,防止浏览器ajax跨域问题
* @param {Object} request http请求
*/
fetch(request) {
return buildPromiseCommon('fetchAsync', '', [request])
},

/**
* 根据下载请求解析响应相关内容
* @param {Object} request 下载请求
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proxyee-down-extension-sdk",
"version": "1.0.10",
"version": "1.1.0",
"description": "proxyee-down extension development js SDK.",
"main": "index.js",
"devDependencies": {
Expand Down

0 comments on commit 358c277

Please sign in to comment.