How to send a POST request? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

How to send a POST request?

21 Jan 2019, 12:42

Hello,

How to send a POST request?
Thanks.

For example, send a POST request to

Code: Select all

https://www.autohotkey.com/boards/ucp.php?mode=login
and the request value is

Code: Select all

username=afe&password=&redirect=.%2Fucp.php%3Fmode%3Dlogin&sid=6de1b49c2d98b0651fd48102298cfbb7&redirect=index.php&login=Login
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

Re: How to send a POST request?

25 Jan 2019, 03:44

Thank you very much.
User avatar
Tigerlily
Posts: 377
Joined: 04 Oct 2018, 22:31

Re: How to send a POST request?

28 Jan 2019, 05:27

afe wrote:
25 Jan 2019, 03:44
Thank you very much.
Happy to help! I've been wanting to utilize WinHttp instead of what I am currently using (cURL via headless Command Prompt), just haven't gotten around to it yet. Did these resources help you send that POST request succesfully?
-TL
afe
Posts: 615
Joined: 06 Dec 2018, 04:36

Re: How to send a POST request?

28 Jan 2019, 09:22

Yes, With your help, I solved the problem that is very important and overwhelmed.
I sent the request successfully.

Code: Select all

whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
whr.Open("POST", url, true)
whr.SetRequestHeader("User-Agent", User-Agent)
whr.SetRequestHeader("Content-Type", Content-Type)
whr.SetRequestHeader("Cookie", Cookie)
whr.Send(Data)
whr.WaitForResponse()
Thank you so much!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, imbelicalcord, jollyjoe, Rohwedder and 263 guests