I thank in advance if anyone can help me. 

The code below: 

        ZnClient new 
  url: 'http://127.0.0.1:5001/add?stream-channels=true';
                addPart: (ZnMimePart fieldName: 'file' fileNamed:
'file.txt'); 
  post. 

generates the following response using netcat: 

nc -l 5001 
POST /add?stream-channels=true HTTP/1.1 
User-Agent: Zinc HTTP Components 1.0 
Content-Length: 194 
Host: 127.0.0.1:5001 
Content-Type: multipart/form-data;boundary=Boundary-Zn-IDMNDZTQ 
Accept: */* 

--Boundary-Zn-IDMNDZTQ 
Content-Disposition: form-data;name="file";filename="file.txt" 
Content-Length: 16 
Content-Type: text/plain;charset=utf-8 

file.txt content 
--Boundary-Zn-IDMNDZTQ-- 

however I would like to get: 

nc -l 5001 
POST /add?stream-channels=true HTTP/1.1 
User-Agent: Zinc HTTP Components 1.0 
Content-Length: 194 
Host: 127.0.0.1:5001 
Content-Type: multipart/form-data;boundary=Boundary-Zn-IDMNDZTQ 
Accept: */* 

--Boundary-Zn-IDMNDZTQ 
Content-Type: application/octet-stream 
Content-Disposition: form-data;name="file";filename="file.txt" 
Content-Length: 16 
Content-Type: text/plain;charset=utf-8 

file.txt content 
--Boundary-Zn-IDMNDZTQ-- 

I not figured out how to get the extra line "Content-Type: application /
octet-stream" using Zinc. 



-----
http://chico...@gmail.com
--
View this message in context: 
http://forum.world.st/How-to-generate-Content-Type-application-octet-stream-with-Zinc-client-tp4876671.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to