{"size": 764, "ext": "js", "max_stars_repo_path": "src/api/restful.js", "max_stars_repo_name": "zxn890217/usercenter-element-ui", "max_stars_repo_stars_event_min_datetime": "2020-06-17T13:48:12.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-17T13:48:12.000Z", "max_issues_repo_path": "src/api/restful.js", "max_issues_repo_name": "zxn890217/usercenter-element-ui", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/api/restful.js", "max_forks_repo_name": "zxn890217/usercenter-element-ui", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.5918367347, "max_line_length": 40, "alphanum_fraction": 0.582460733}
import request from '@/utils/request'

export function fetchQuery(url, query) {
  return request({
    url: url,
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: query
  })
}

export function fetchSave(url, data) {
  return request({
    url: url,
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function fetchGet(url) {
  return request({
    url: url,
    method: 'get'
  })
}

export function fetchUpdate(url, data) {
  return request({
    url: url,
    method: 'put',
    headers: {
      'Content-Type': 'application/json'
    },
    data: data
  })
}

export function fetchDelete(url) {
  return request({
    url: url,
    method: 'delete'
  })
}
