Hallo, ich bin grade am twittern:
Spoiler anzeigen
$oHTTP=ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST","http://twitter.com/statuses/update.xml?status=Test via AutoIt-tool")
$oHTTP.SetCredentials( "uname","pwd")
;bei msdn stand WinHttpReq.SetCredentials( "User Name", "Password",HTTPREQUEST_SETCREDENTIALS_FOR_SERVER)
;aber das ging nicht, auch nicht, wenn ich den dritten Parameter eingestringt habe
$oHTTP.Send()
$res=$oHTTP.ResponseText
MsgBox(0,"",$res)
ZitatD:\*****\WinHTTP.au3 (3) : ==> The requested action with this object has failed.:
$oHTTP.SetCredentials( "uname","pwd")
$oHTTP.SetCredentials( "uname","pwd")^ ERROR
was mache ich falsch, wie authentifiziert man sich mittels WinHTTP an einem Server?
edit: Habe soeben die UDF gefunden, komme aber ebenfalls nicht so richtig klar damit:
Spoiler anzeigen
#include "WinHTTP.au3"
$hw_open = _WinHttpOpen()
$hw_connect = _WinHttpConnect($hw_open, "http://twitter.com/")
$h_openRequest = _WinHttpOpenRequest($hw_connect, "POST", "statuses/update.xml")
_WinHttpSetCredentials($h_openRequest, $WINHTTP_AUTH_TARGET_SERVER, $WINHTTP_AUTH_SCHEME_BASIC, "L3viathan", "passwort")
_WinHttpSendRequest($h_openRequest)
_WinHttpWriteData($h_openRequest, "status=Test via AutoIt")
MsgBox(0,"",_WinHttpReceiveResponse($h_openRequest))
_WinHttpCloseHandle($h_openRequest)