How to use the utils.request function in utils

To help you get started, we’ve selected a few utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liuxx001 / bird-front / src / components / Form / BirdButton.js View on Github external
refreshToken() {
    request({
      url: config.api.getOperationToken,
      method: 'GET'
    }).then(token => {
      this.setState({ token: token })
    })
  }
github liuxx001 / bird-front / src / components / File / FileIcon.js View on Github external
initFileName(props) {
    if (util.string.isEmpty(props.url) || !props.queryFileName) {
      this.setState({ fileName: props.url })
    } else {
      request({
        url: config.api.getFileName + this.props.url,
        method: 'GET'
      }).then(fileName => {
        this.setState({ fileName: fileName })
      })
    }
  }
github liuxx001 / bird-front / src / components / Form / BirdCascader.js View on Github external
componentDidMount() {
    if (this.props.data.length > 0) {
      this.initData(this.props.data);
    } else if (this.props.url) {
      request({
        url: this.props.url,
        method: 'GET'
      }).then(data => {
        this.initData(data);
      })
    }
  }

utils

Fast, generic JavaScript/node.js utility functions.

MIT
Latest version published 9 years ago

Package Health Score

44 / 100
Full package analysis