I've been trying to uplaod a picture to imgur.com with functions from winhttp.au3
Examples using curl use the -F switch to POST form data. So I tried the same with _WinHttpSimpleFormFill to imgur.com/api/upload.xml.
..and @error is set to 1. No form on that page? The what does curl do
I sure am missing something. Help a bit?
Examples using curl use the -F switch to POST form data. So I tried the same with _WinHttpSimpleFormFill to imgur.com/api/upload.xml.
..and @error is set to 1. No form on that page? The what does curl do
![:huh2:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/huh2.gif)
[ autoit ]
Global $hOpen = _WinHttpOpen(" Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) (Prevx 3.0.5) ") ; Get connection handle Global $hConnect = _WinHttpConnect( $hOpen, "imgur.com" ) Global $sHTM = _WinHttpSimpleFormFill( $hConnect, "api/upload.xml", "index:0", "name:key", "b3625162d3418ac51a9ee805b1840452", "name:image", _PathFull($tempfile) ) If @error Then MsgBox(68, "", "Error" & @error) ConsoleWrite( $sHTM ) ; Close handles _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)