Tag: http chunked

HTTP multipart和chunking可以共存吗?

我正在使用apache HttpClient将几个文件发布到服务器。 这是代码: public static HttpResponse stringResponsePost(String urlString, String content, byte[] image, HttpContext localContext, HttpClient httpclient) throws Exception { URL url = new URL(URLDecoder.decode(urlString, “utf-8”)); URI u = url.toURI(); HttpPost post = new HttpPost(); post.setURI(u); MultipartEntity reqEntity = new MultipartEntity(); StringBody sb = new StringBody(content, HTTP_CONTENT_TYPE_JSON, Charset.forName(“UTF-8”)); ByteArrayBody ib = new ByteArrayBody(image, HTTP_CONTENT_TYPE_JPEG, “image”); reqEntity.addPart(“interview_data”, […]