Search code examples
google-apps-scripthttp-geturlfetchrest

GET request with a body, Google Script App


I would like to make a GET request with Google Script App on a RestAPI. I was planning on using the function fetchAPI(url, params). Here is the list of arguments I can use in parameters: params arguments from https://developers.google.com/

I don't see "body" in the list of arguments. Does that mean it's not possible to make a GET request WITH BODY with the Google script App?

Thanks for you help!


Solution

  • According to the official documentation UrlFetchApp:

    GET requests do not accept a payload body.

    "the payload (that is, the POST body) for the request. Certain HTTP methods (for example, GET) do not accept a payload."