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

285
Vistas
How to fetch a URL containing a # with Fetch API?

I'm using the Google Calendar API and to fetch the events of a calendar, you must send a GET request to the https://www.googleapis.com/calendar/v3/calendars/calendarId/events endpoint.

Problem is calendarId may contain a # like in addressbook#contacts@group.v.calendar.google.com and when when I fetch https://www.googleapis.com/calendar/v3/calendars/addressbook#contacts@group.v.calendar.google.com/events, it's only actually fetching https://www.googleapis.com/calendar/v3/calendars/addressbook, i.e. the part of the URL before the # (I see it in the Chrome Network tab and I just get GET https://www.googleapis.com/calendar/v3/calendars/addressbook 404 in the console)

So how can I force the fetch() method to use the entire URL ?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You probably need to percent-encode the calendarId:

> encodeURIComponent("addressbook#contacts@group.v.calendar.google.com")
"addressbook%23contacts%40group.v.calendar.google.com" 
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