[Newbies] HTTPSocket>>argString:args
ernst
ernst at hisplace.net
Mon Aug 14 12:04:30 UTC 2006
Just found out about HTTPSocket. It seems to be the class which should be
used for http requests. It also can do basic authentication.
Thanks
ernst
ernst wrote:
>
> Is there a bug in this method?
> An association in the args dictionary will contain the name of a prameter
> and its value as a string. The iteration assoc value do: [ :value |
> will operate on characters of the value which I think is not intended.
> ....
> args associationsDo: [ :assoc |
> assoc value do: [ :value |
> first ifTrue: [ first := false ] ifFalse: [ argsString nextPut: $& ].
> argsString nextPutAll: assoc key encodeForHTTP.
> argsString nextPut: $=.
> argsString nextPutAll: value encodeForHTTP. ] ].
>
> should be?
> ....
> args associationsDo: [ :assoc |
> first ifTrue: [ first := false ] ifFalse: [ argsString nextPut: $& ].
> argsString nextPutAll: assoc key encodeForHTTP.
> argsString nextPut: $=.
> argsString nextPutAll: assoc value encodeForHTTP ].
>
--
View this message in context: http://www.nabble.com/HTTPSocket%3E%3EargString%3Aargs-tf2102777.html#a5795456
Sent from the Squeak - Beginners forum at Nabble.com.
More information about the Beginners
mailing list