Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
¿Cuál es la mejor manera de registrar un nuevo usuario? - get vs post

Estoy tratando de aprender las mejores prácticas para registrar nuevos usuarios.

Solo puedo pensar en dos opciones (¡pero tal vez haya más!) Y espero saber cuál es mejor para la velocidad y para la práctica en general:

primer método:

 a. once the user submits a new user&pass, i make a GET request on a REST entrypoint b. if the user exists then let him know, if not then make a POST request

segundo método:

 a. once the user submits a new user&pass, i make a POST request, within which a GET request is made. b. if the user exists then let him know, if not then continue with the POST

Además, en caso de que se realicen dentro de un punto de entrada, vuelva al cliente y luego haga que js haga otra llamada.

Gracias

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Es mejor tener solo una solicitud POST, que devuelva un estado 409 (conflicto) si el usuario ya existe y un estado 201 (recurso creado) si el usuario se creó correctamente.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!