iamP
iamP

Reputation: 317

How to send body in a HTTP Get Request Angular 9

I could send a body(json) in Postman for a GET request.

enter image description here

My Problem is I am not able to do the same in my yes-no.service.ts file.

getYesNoDropdowns() {
  return this.http.get(AppComponent.lookUpListUrl, { headers: headers });
}

How do I achieve this? I have to use only Get.

Thanks in advance!

Upvotes: 1

Views: 13189

Answers (1)

Adrian Brand
Adrian Brand

Reputation: 21638

Posts have a body, gets do not. You will need to put the data on the query string if you are using a get.

Upvotes: 0

Related Questions