//HTTP文件流方式上传

import process
import inet.http
io.open()
http = inet.http(  );

http.beginRequest( "http://www.ecranesoft.com/ape/test/post.asp" );

//循环上传
http.beginSendData(1000)  
for(i=1;1000;1){
	http.writeData( tostring(i) )
} 
http.endSendData()

//循环下载
file = io.open("/test.html","w+b") 
for(str,size in http.eachRead() ){ 
	file.write( str );
} 

io.print("ok")
