After axios configures the agent. Only get requests can be sent. After setting method to post. Or will it become get?

after axios configures the agent. Only get requests can be sent. After setting method to post. Or will it become get

clipboard.png

clipboard.png
clipboard.png

May.06,2022

Why do I think you have the wrong match? I'll send a paragraph I deserve

.
'/emsApi': {
    target: 'http://10.10.11.65:8094/api',
    changeOrigin: true,
    pathRewrite: {
      '^/emsApi': '/'
    }
  },

if I request login, then the url I request is'/ emsApi/login', the actual requested address is' http://10.10.11.65:8094/api/login'


see the official create instance
usually do not configure the request method directly when creating the instance. To configure the request method, please see the following column (including get and post)

//  POST 
axios({
  method: 'post',
  url: '/user/12345',
  data: {
    firstName: 'Fred',
    lastName: 'Flintstone'
  }
});
Menu