0👍
Can you verify the following codes:
let listOfRights= [
{ RouteName: "Rname", UserName: "Uname" },
{ RouteName: "Rname1", UserName: "Uname1" }
]
let url = '/api/UserManager/saveUserRights'
let headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
axios.post(url, listOfRights, headers).then((response) => {
console.log(response)
}, (error) => {
console.log('EROR:', error)
})
And check the console.logs what it returns.
You can also put a breakpoint on your server side code to see if it does pass the correct data.
- [Vuejs]-SyntaxError: Unexpected token … in serialport in node_modules
- [Vuejs]-Router-view not listing component
0👍
This one worked for me. you can try this
axios({
method: 'post',
url: '/api/customersfilter',
data: {
min_number: this.min_number,
equal_num: this.equal_num,
max_number: this.max_number,
}
})
- [Vuejs]-Vuejs use v-if with hash variable
- [Vuejs]-JWT How should I protected endpoints for user and admin?
0👍
Fixed by adding [FromBody] tag in API method
public IActionResult saveUserRights([FromBody]List<SystemMenuRights> listOfRights)
and it is now accepting list as well.
- [Vuejs]-Get siblings of created file in firebase cloud function triggered by onFinalize
- [Vuejs]-In Vue JS, assign data from mounted()
Source:stackexchange.com