简体   繁体   中英

How to send body in a HTTP Get Request Angular 9

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

在此处输入图像描述

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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM