HTTP GET request with headers

I am using the capacitor-community/http library. I have to hit the GET request with headers. While using this library, I am getting the below errors:

Here is my CODE:

let httpHeaders :HttpHeaders = {
‘Accept’: ‘application/json, text/plain, /,charset=utf-8’,
‘Content-Type’: ‘application/x-www-form-urlencoded’,

let httpOptions = {
  url: "URL",
  method: 'GET',
  headers: httpHeaders    

core.js:6479 ERROR TypeError: Failed to execute ‘fetch’ on ‘Window’: Request with GET/HEAD method cannot have body.

Does anyone have any idea how to do that?

Your Content-Type is only suitable for POST requests, not GET ones. As the error message is telling you, GET requests cannot have bodies. If you are putting things in the body of a request, you must change the method to POST or PUT.

Thanks @rapropos . It hepls.