Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
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
User-agent: Mozilla....
Authorization: Basic xxxxx
Credentials: admin:admin

My code is :

proc geturl_auth {url username password} {
   set auth "Basic [base64::encode $username:$password]"
   set ref "\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 and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho