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

162
Views
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 answers
Answer question

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 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!