Binary in an http request

Diego Gomez Deck DiegoGomezDeck at ConsultAr.com
Wed Jun 12 20:43:06 UTC 2002


Hello...

>Thanks Lex for your answer,
>
> > You could use HTTPSocket's various post commands.  They will do all the
> > encoding for you -- you just create a dictionary mapping names to data.
> > It normally expects strings for the data, not ByteArrays.
>
>But if I want something else than a String ? Such as an imageSegment :-)
>
>Alexandre

To convert binary data using all the 8 bits to a format that use only 7 
bits you need a algorithm know as Base64Encode/Decode.

In Squeak see at class Base64MimeConverter, and the method 
Base64MimeConverter class>>example

See you,

Diego Gomez Deck





More information about the Squeak-dev mailing list