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 ].
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 ].
beginners@lists.squeakfoundation.org