Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

154
Vistas
put request firebase realtime database

I am using real-time Database:

enter image description here

This is a put request in which users generate key onClick. This is working fine.

When a send user login from different device it just replaces the previous user.

enter image description here

It does not add a new user history

import axios from 'axios';

const endPoint = 'https://*_hide_.firebaseio.com/userHistory.json/'


export const UserHistory = (data) => {
     let token = localStorage.getItem('token')
     return axios.put(endPoint,JSON.stringify(data), {
        headers :{ 
           'Content-Type': 'application/json',
           'Authorization': 'Bearer'+ token
      }
   }) 
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Calling put on a path replaces any existing value at that path with the value that you specify.

If you want to add a new child node under the path, you should use post instead of put.

If you want to merge the data you specify with any existing values at the path, you should use patch instead of put.

For more on this, also see the Firebase documentation on writing data to the Realtime Database with its REST API.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda