mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-23 22:23:54 +00:00
request
This commit is contained in:
@@ -1,12 +1,5 @@
|
||||
const Ajax = require('robe-ajax')
|
||||
|
||||
/**
|
||||
* Requests a URL, returning a promise.
|
||||
*
|
||||
* @param {string} url The URL we want to request
|
||||
* @param {object} [options] The options we want to pass to "fetch"
|
||||
* @return {object} An object containing either "data" or "err"
|
||||
*/
|
||||
export default function request (url, options) {
|
||||
if (options.cross) {
|
||||
return Ajax.getJSON('http://query.yahooapis.com/v1/public/yql', {
|
||||
|
||||
Reference in New Issue
Block a user