Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要将 XML 数据发送到 URL。XML 数据包含在字符串缓冲区中。我需要发布它并获取响应代码。
谁能告诉我该怎么做?
我有一段代码,但 Eclipse 说它已弃用
PostMethod postMethod = new PostMethod(URL); InputStream stream = new StringBufferInputStream(command); postMethod.setRequestBody(stream);
Javadoc说要改用setRequestEntity(RequestEntity)。