Acce Posted August 5, 2020 Share Posted August 5, 2020 Im working with a site and have built a nice little script using the WinHttp.au3 libary So far I have been able to login to the site Next step is to navigate further and looking in Network tab it looks like a "action" is sent with the next request header it looks like this query string parameters action=fetch_number_1 How is this sent using an _httprequest, here is how I have built up the code: ; Send Action Global $hRequest = _WinHttpOpenRequest($hConnect, _ "POST", _ "/start/index", _ Default, _ Default, _ "text/plain, */*; q=0.01", _ $WINHTTP_FLAG_SECURE) ;Set NEW Request Headers _WinHttpAddRequestHeaders($hRequest, "x-requested-with: XMLHttpRequest") _WinHttpAddRequestHeaders($hRequest, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36") _WinHttpAddRequestHeaders($hRequest, "Content-Type: application/x-www-form-urlencoded") ; Send it _WinHttpSendRequest($hRequest, -1) Obviously its missing the action parameter as im unsure where I should insert it Link to comment Share on other sites More sharing options...
trancexx Posted August 5, 2020 Share Posted August 5, 2020 That last line. ;... _WinHttpSendRequest($hRequest, -1, "action=fetch_number_1") ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Acce Posted August 6, 2020 Author Share Posted August 6, 2020 thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now