As visible on openacs.org api docs:

http://openacs.org/api-doc/proc-view?proc=util_httppost&source_p=1&version_id=

In cvs head:

http://cvs.openacs.org/cvs/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl?rev=HEAD&view=auto



On 3/31/06, Titi Ala'ilima <[EMAIL PROTECTED]> wrote:
> ACS (Open, etc.) has a version of httpget called util_httpget, which
> allows a little more customization, i.e. allowing you to set headers.
> So the equivalent to putting the username and password into the URL is
> adding an "Authorization" header of the form "Basic $token" where token
> is "username:password" base64 encoded.  So here is what I do:
>
> set url
> "http://geocoder.us/member/service/csv/geocode?address=$address,+$city+$state+$zip";
> package require base64
> set headers [ns_set create]
> ns_set put $headers "Authorization" "Basic [base64::encode
> username:password]"
> set result [util_httpget $url $headers]
>
> I don't have a recent version of util_httpget so there might be some
> improvements in recent versions.  If you want though, I can send you a
> copy of the version I have.
>
> -T.
>
>
> Thorpe Mayes wrote:
> > I am trying to go here:
> >
> > "ns_httpget "http://username:[EMAIL 
> > PROTECTED]/member/service/csv/geocode?address=
> > $newaddress,+$newcity+$state""
> >
> > and am getting this error message:
> >
> > Error: expected integer but got "[EMAIL PROTECTED]"
> > expected integer but got "[EMAIL PROTECTED]"
> >     while executing
> > "ns_sockopen -nonblock $host $port"
> >     (procedure "ns_httpopen" line 11)
> >     invoked from within
> > "ns_httpopen GET $url "" $timeout"
> >     (procedure "ns_httpget" line 5)
> >     invoked from within
> > "ns_httpget "http://username:[EMAIL 
> > PROTECTED]/member/service/csv/geocode?address=
> > $newaddress,+$newcity+$state""
> >
> >
> > Is there a work-around?
> >
> > Thank you.
> >
> > Thorpe
> >
> >
> > --
> > AOLserver - http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an email to <[EMAIL 
> > PROTECTED]> with the
> > body of "SIGNOFF AOLSERVER" in the email message. You can leave the 
> > Subject: field of your email blank.
> >
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <[EMAIL 
> PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
>


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to