EKY32 Posted September 26, 2014 Posted September 26, 2014 Hello, I was using >WinHttp.au3 to get the source of a page: https://graph.facebook.com/Eky32 #include "WinHttp.au3" $sDomain = "https://graph.facebook.com/Eky32" ; Initialize and get session handle $hOpen = _WinHttpOpen() ; Get connection handle $hConnect = _WinHttpConnect($hOpen, $sDomain) ; SimpleSSL-request it... $sReturned = _WinHttpSimpleSSLRequest($hConnect) ; Close handles _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; See what's returned ConsoleWrite($sReturned) ;~ ClipPut($sReturned) Data returned: {"error":{"message":"Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api","type":"GraphMethodException","code":100}} What is the problem with the GET request? It is working fine using _INetGetSource but I read somewhere that WinHttp get request is faster for bigger amount of data, some help please? [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
Solution trancexx Posted September 26, 2014 Solution Posted September 26, 2014 You are calling it wrong. Try this: #include "WinHttp.au3" $sDomain = "https://graph.facebook.com" ; Initialize and get session handle $hOpen = _WinHttpOpen() ; Get connection handle $hConnect = _WinHttpConnect($hOpen, $sDomain) ; SimpleSSL-request it... $sReturned = _WinHttpSimpleSSLRequest($hConnect, Default, "Eky32") ; Close handles _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) ; See what's returned ConsoleWrite($sReturned & @CRLF) EKY32 1 ♡♡♡ . eMyvnE
EKY32 Posted September 26, 2014 Author Posted September 26, 2014 Thank you, I love your work very much. [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
EKY32 Posted September 26, 2014 Author Posted September 26, 2014 What is the timeout of the HTTP get request? and is there a way to control it? [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
trancexx Posted September 26, 2014 Posted September 26, 2014 Well, there is _WinHttpSetTimeouts() function inside the UDF. EKY32 1 ♡♡♡ . eMyvnE
EKY32 Posted September 26, 2014 Author Posted September 26, 2014 Another thank you. ♥ [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
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