BL_PENETRATOR
Новичок
- Сообщения
- 11
- Репутация
- 0
Здравствуйте!
Не могу получить данные с сервера.
На форуме ответ не нашёл.
Ошибка $oHTTP.Status, $oHTTP.ResponseText
The requested action with this object has failed
Не могу получить данные с сервера.
На форуме ответ не нашёл.
Ошибка $oHTTP.Status, $oHTTP.ResponseText
The requested action with this object has failed
Код:
Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1")
$oHTTP.Open("POST", 'https://heroes-wb.nextersglobal.com/api/', False)
If (@error) Then MsgBox(0,'','ERROR')
$oHTTP.setTimeouts(5000, 5000, 15000, 15000)
$oHTTP.SetRequestHeader("Host", "heroes-wb.nextersglobal.com")
$oHTTP.SetRequestHeader("Connection", "keep-alive")
$oHTTP.SetRequestHeader("Content-Length", "61")
$oHTTP.SetRequestHeader("X-Auth-Signature", "590f10c891aa62800934e68201496cea")
$oHTTP.SetRequestHeader("X-Server-Time", "0")
$oHTTP.SetRequestHeader("X-Auth-Session-Id", "0q8vl3e0zi5ge9")
;$oHTTP.SetRequestHeader("X-Auth-Session-Key", "")
$oHTTP.SetRequestHeader("X-Auth-Application-Id", "3")
$oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36")
$oHTTP.SetRequestHeader("X-Auth-User-Id", "6541592")
$oHTTP.SetRequestHeader("X-Auth-Player-Id", "892080")
$oHTTP.SetRequestHeader("X-Auth-Network-Ident", "web")
$oHTTP.SetRequestHeader("X-Auth-Token", "ps-01b1wHAf-1587031171-94.153.3.253-51526ebb706eae8aaa042247b3b4e6e3")
$oHTTP.SetRequestHeader("X-Env-Library-Version", "1")
$oHTTP.SetRequestHeader("X-Requested-With", "XMLHttpRequest")
$oHTTP.SetRequestHeader("Content-Type", "application/json; charset=UTF-8")
$oHTTP.SetRequestHeader("X-Request-Id", "94")
$oHTTP.SetRequestHeader("Accept", "*/*")
$oHTTP.SetRequestHeader("Origin", "https://hero-wars.com")
$oHTTP.SetRequestHeader("Sec-Fetch-Site", "cross-site")
$oHTTP.SetRequestHeader("Sec-Fetch-Mode", "cors")
$oHTTP.SetRequestHeader("Sec-Fetch-Dest", "empty")
$oHTTP.SetRequestHeader("Referer", "https://hero-wars.com/?nx_source=group_posting_-.pt-gift.gt-lootboxy.cq-5.-&gift_id=Qs3SbArXsd")
$oHTTP.SetRequestHeader("Accept-Encoding", "gzip, deflate, br")
$oHTTP.SetRequestHeader("Accept-Language", "ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7")
;$oHTTP.WaitForResponse
ConsoleWrite( $oHTTP.Status & @CRLF)
$oHTTP.Send('{"calls":[{"name":"clanGetOnline","args":{},"ident":"body"}]}')
If (@error) Then MsgBox(0,'', 'ERROR')
ConsoleWrite( $oHTTP.ResponseText & @CRLF)
$oHTTP.Close