Hotel API

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Wingetrob12
Posts: 1
Joined: 31 Jul 2021, 06:26

Hotel API

31 Jul 2021, 06:44

Can anyone help me to convert this Hotel API?
Last edited by gregster on 31 Jul 2021, 06:51, edited 1 time in total.
Reason: Post was split from unrelated topic.
malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Hotel API

01 Aug 2021, 08:49

You need to use winhttprequest.
For example to get jwt token You can do like this:

Code: Select all

username := "login"
password := "pass"
HTTP := ComObjCreate("WinHTTP.WinHTTPRequest.5.1")
HTTP.Open("POST", "https://api.makcorps.com/auth", true)
HTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko")
HTTP.SetRequestHeader("Pragma", "no-cache")
HTTP.SetRequestHeader("Cache-Control", "no-cache, no-store")
HTTP.SetRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT")
HTTP.SetRequestHeader("Content-Type", "application/json")
HTTP.Send("{""username"":""" username """, ""password"":""" password """}")
HTTP.WaitForResponse()
msgbox % HTTP.ResponseText

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, jameswrightesq, mikeyww, wpulford and 327 guests