import request from '@/utils/request'

// 创建反向代理配置
export function createReverseProxy(data) {
  return request({
    url: '/server/reverse-proxy/create',
    method: 'post',
    data: data
  })
}

// 更新反向代理配置
export function updateReverseProxy(data) {
  return request({
    url: '/server/reverse-proxy/update',
    method: 'post',
    data: data
  })
}

// 删除反向代理配置
export function deleteReverseProxy(id) {
  return request({
    url: '/server/reverse-proxy/delete?id=' + id,
    method: 'post'
  })
}

// 获得反向代理配置
export function getReverseProxy(id) {
  return request({
    url: '/server/reverse-proxy/get?id=' + id,
    method: 'get'
  })
}

// 获得反向代理配置分页
export function getReverseProxyPage(params) {
  return request({
    url: '/server/reverse-proxy/page',
    method: 'get',
    params
  })
}
// 导出反向代理配置 Excel
export function exportReverseProxyExcel(params) {
  return request({
    url: '/server/reverse-proxy/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
