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

97
Vistas
Angular 5 HTTP failure during parsing for image

I want to get image from Express server with Angular using its filename:

Request from Angular service

And I want to send the file back to the client:

Sending file from Express server

When I log the response from the server I get the following error:

Error message from response

I am nearly sure that I am missing any options either in my request or in my response, but I am not sure what.

Any help would be highly appreciated.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

HttpClient applies the 'json()' method to the response, so if your response is non-JSON data, you'll get this type of error.

Although it is the most common, you will sometimes deal with different types of data. This is supported through the responseType property.

 this.http.get('...', { responseType: 'text' }); //

response type?: 'arraybuffer' | 'stain' | 'json' | 'text'

over 4 years ago · Santiago Trujillo 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