<HTML>
<HEAD>
<TITLE>Re: How to post a GIF file to an HTTP server</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:14.0px'>Rudolf Coetsee puso en su mail :<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><FONT SIZE="4"><SPAN STYLE='font-size:16.0px'>Hi<BR>
<BR>
I would like to post a GIF file to a server using the "httpPost" method of the "HTTPSocket" class in Squeak. Can anyone please send me a code snippet on how this works. I think I have to somehow put the contents of the image file into the "argsDict" object, but I am not sure whether I should encode the contents first or not. If I have to encode it, is there a method I can use already in Squeak? <BR>
<BR>
Thanks in advance<BR>
<BR>
RUDOLF COETSEE <BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:14.0px'>Rudolf :<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Verdana, Helvetica, Arial"><FONT SIZE="4"><SPAN STYLE='font-size:16.0px'>See Form </SPAN></FONT><SPAN STYLE='font-size:14.0px'>asWebImage, could be what you need<BR>
</SPAN><FONT SIZE="4"><SPAN STYLE='font-size:16.0px'><BR>
</SPAN></FONT><SPAN STYLE='font-size:14.0px'>asWebImage<BR>
"return a MIMEDocument"<BR>
| aStream |<BR>
aStream := RWBinaryOrTextStream on: ''.<BR>
GIFReadWriter<BR>
putForm: (self asFormOfDepth: 8)<BR>
onStream: aStream.<BR>
aStream reset.<BR>
^ MIMEDocument contentType: MIMEDocument contentTypeGif content: aStream</SPAN></FONT>
</BODY>
</HTML>