正嘗試使用autohotkey爲使用autohotkey的海報請求創建一個帶有autohotkey的GUI。使用Autohot鍵的海報插件
防爆:
{
"hwId":"2703",
"clientApiVersion":"1.0.0",
"sellId":"123456",
"uid":"123456",
"targetUserId":"123456",
"templateId":"123456",
"overrideValues": [{"name":"USERNAME","value":"test"}],
"customMessages": [{"name":"key1","value":"value1"},{"name":"key2","value":"value2"}],
"language":"en",
"verificationCode":"code",
"badge":"33",
}
這是海報的身體,我使用。這些是輸入並顯示輸出。通常當我發送POST請求時,我在json中得到響應。有些人可以幫我解決這個問題...我試圖搜索網頁,但找不到與autohotkey的海報插件相關的任何內容。
請幫助我們。
以下是我用
#NoEnv
#SingleInstance, Force
;InputBox, pass, Password, Enter password.
URL := "https://examplesite.com/exchange/api/ios/sendPushNotificationTemplateByUid"
;PostData := "username=Pulover&password=" pass
PostData := "
(
hwId=2703,
clientApiVersion=1.0.0,
sellId=865895,
uid=573675618,
targetUserId=573675618,
templateId=78,
language=en,
verificationCode=code,
badge=50,
)"
oHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
;Post request
oHTTP.Open("POST", URL , False)
;Add User-Agent header
oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)")
;Add Referer header
oHTTP.SetRequestHeader("Referer", URL)
;Add Content-Type
oHTTP.SetRequestHeader("Content-Type", "application/JSON")
;Send POST request
oHTTP.Send(PostData)
;Get received data
Gui, Add, Edit, w800 r30, % oHTTP.ResponseText
Gui, Show
return
GuiClose:
ExitApp
你在哪裏有問題?向我們展示您的代碼! – MCL