鍍金池/ 問答/HTML/ vue axios請求怎么獲取 Response中的自定義headers

vue axios請求怎么獲取 Response中的自定義headers

vue axios請求怎么獲取 Response中的自定義headers

回答
編輯回答
青裙
{
  // `data` is the response that was provided by the server
  data: {},

  // `status` is the HTTP status code from the server response
  status: 200,

  // `statusText` is the HTTP status message from the server response
  statusText: 'OK',

  // `headers` the headers that the server responded with
  // All header names are lower cased
  headers: {},

  // `config` is the config that was provided to `axios` for the request
  config: {},

  // `request` is the request that generated this response
  // It is the last ClientRequest instance in node.js (in redirects)
  // and an XMLHttpRequest instance the browser
  request: {}
}

axios

2018年7月12日 11:46