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

157
Vistas
Does ajax or fetch api automatically send cookies with the request? If not then what is the way to achieve this?

I have login controller action that sends a cookie back to the user browser.

In every subsequent request the browser automatically places the cookie into the request and this is how the controller actions knows that the user is authenticated.

This question is to ask whether an ajax requset (example below) or fetch request that is made from the UI JavaScript code will also automatically send the cookie? If not, then is the correct way to read the cookie using document.cookie and add it into the ajax/fetch api request?

$.ajax({ type: "GET", url: "/Matter?matterId=" + matterId, success: (data) => { ....

about 4 years ago · Juan Pablo Isaza
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