Is there any way to get the request made, instead of the response?

In the geolocator API, the function navigator.geolocation.getCurrentPosition() sends a POST request to the Google geolocator API, with the following json body:

{
  "wifiAccessPoints":[
    //insert the listening access points here
  ]
}

What I want is not the response from the API, but instead this JSON in the request it made. Is there any way to save this request in a variable? Or will I have to intercept it with a proxy?