| |||||||||||
TCL http Posted by rome77 (rome77), 16 May 2006 Hello ALL!!!I need to create the HTTP package : POST /reset/index.html /HTTP/1.1\r\n Request method: POST Request URI: /reset/index.html Request Version: HTTP/1.1 Host: 192.168.1.1\r\n User-agent: Mozilla.... Referer: http://192.168.1.1/reset/\r\n Authorization: Basic xxxxx Credentials: admin:admin My code is : proc geturl_auth {url username password} { set auth "Basic [base64::encode $username:$password]" set ref "http://192.168.1.1/reset/\n" set zapros "reset/index.html" set headerl [list Authorization $auth Referer $ref] set tok [http::geturl $url -headers $headerl ?? -query ] set res [http::data $tok] http::cleanup $tok return $res } Without the -query option I have GET request. If I apply -query it insert "Line-based text data: application/x-www-form-url-encoded" in the package. In this case the device ( I need that for reset the ADSL modem ) answer - Bad request. Could help me anyboby . Sorry for my english. This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
Other Forum Posts Follow us on ... | ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |