2👍
Make sure to use the put instead of the post request else you’ll end up with the auto generated id inside of your “user_one”
POST will give you:
{
"users": {
"user_one": {
"134134hnj34nuj134bn": {
"username": "jdoe",
"password": "123"
}
}
}
}
axios.put('https://projectname.firebaseio.com/padres/user_one.json', padre)
PUT will give you what you want.
{
"users": {
"user_one": {
"username": "jdoe",
"password": "123"
}
}
}
- [Vuejs]-How to access module state inside store's getter?
- [Vuejs]-Vuejs api response result to many variables
0👍
There sure is. Just use the HTTP PUT
method and specify the entire path. Depending on your library it may be as simple as:
axios.post('https://projectname.firebaseio.com/padres/user_one.json', padre)
For more, see the Firebase REST API documentation on the PUT command.
- [Vuejs]-How do you target a button, which is in another component, with a method in App.vue?
- [Vuejs]-Pass select option value to input field using VueJS
0👍
If you are using Php cURL, i had achieved this with PUT by adding my custom ID in url.
Source:stackexchange.com