@
aaaa007cn 抱歉上面的代码少了信息输出的4行代码。
//要发送的内容(就像抓包那样看到的)
String BOUNDARY = "------WebKitFormBoundaryfV9cW5irwPumXS5m\r\n";
String newSend = BOUNDARY + "Content-Disposition: form-data; name=\"content\"\r\n\r\n";
newSend += "my test" + BOUNDARY;
newSend += "Content-Disposition: form-data; name=\"file\"; filename=\"\"\r\n";
newSend += "Content-Type: application/octet-stream";
newSend += "------WebKitFormBoundaryfV9cW5irwPumXS5m--\r\n";
//上面那部分接下面的这四行代码
DataOutputStream newOut = new DataOutputStream(newConn.getOutputStream());
newOut.write(send.getBytes());
newOut.flush();
newOut.close();
十分感谢