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

160
Vistas
How can I send values in the body in the HTTP GET request in Angular?

I have written the following function in my service:

 /**
   * Get all data
   * @param sendSelectedValues string
   */
  getAllActPlanBalanceYearData(sendSelectedValues: any): Observable<any> {
    const url = `/yearlyvalues/act-and-plan-balance`;
    return this.http.get<any>(`${environment.baseUrl}` + url);
  }

I would like to send sendSelectedValues in the body now. In the post and patch is easily doable. How does it work in the get? Unfortunately I haven't found a solution yet.... Can you help me?

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

0

you can do this with a queryParam:

 getAllActPlanBalanceYearData(sendSelectedValues: string): Observable<any> {
    const params = new HttpParams()
      .set('values', sendSelectedValues);
    const url = `/yearlyvalues/act-and-plan-balance`;
    return this.http.get<any>(`${environment.baseUrl}` + url, { params });
  }

you can't do that in the body

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