Send HTTP POST request for Google Forms

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Wasabi
Posts: 1
Joined: 29 Sep 2022, 12:25

Send HTTP POST request for Google Forms

Post by Wasabi » 29 Sep 2022, 12:55

Hey, as the title mentiones, I'm just trying to send a POST request to a google forms pre-filled link when I press F9. I just installed AHK, and followed some other posts here to help me.

With other platforms, I just need to send the POST request with the link, since it contains the info it needs to send, without the need of a body.

This is what I got in the end, but it's not sending anything. The form just contains two fields: current date, and then a number "1".

Could anyone help me here?

Code: Select all

F9::

url := "https://docs.google.com/forms/d/e/xxxxxxx/formResponse?usp=pp_url&entry.xxxxxxxxx=9/29/2022&entry.xxxxxxxxxx=1"

req := ComObjCreate("WinHttp.WinHttpRequest.5.1")

req.open("POST", url, true)

req.send()

Return to “Ask for Help (v1)”