examples/standard/src/core/request/index.js
async function buildRequest(method, url, params, options) {
  let param = {};
  let config = {};
  if (noneBodyMethod.indexOf(method) >= 0) {
    param = { params: { ...params }, ...reqConfig, ...options };
  } else {
    param = JSON.stringify(params);
    config = {
      ...reqConfig,
      headers: {
        'Content-Type': 'application/json',
        ...csrfConfig,
      },
    };
    config = Object.assign({}, config, options);
  }
  return axios[method](url, param, config);
}
async function buildRequest(method, url, params, options) {
  let param = {};
  let config = {};
  if (noneBodyMethod.indexOf(method) >= 0) {
    param = { params: { ...params }, ...reqConfig, ...options };
  } else {
    param = JSON.stringify(params);
    config = {
      ...reqConfig,
      headers: {
        'Content-Type': 'application/json',
        ...csrfConfig,
      },
    };
    config = Object.assign({}, config, options);
  }
  return axios[method](url, param, config);
}
async function buildRequest ( method , url , params , options ) { let param = { } ; let config = { } ; if ( noneBodyMethod . indexOf ( method ) >= 0 ) { param = { params : { ... params } , ... reqConfig , ... options } ; } else { param = JSON . stringify ( params ) ; config = { ... reqConfig , headers : { 'Content-Type' : 'application/json' , ... csrfConfig , } , } ; config = Object . assign ( { } , config , options ) ; } return axios [ method ] ( url , param , config ) ; }
Build uniform request
Build uniform request