我用下面的代碼在我的客戶:如何訪問服務器端的內容?
HttpPost post = new HttpPost(url);
post.setEntity(new ByteArrayEntity(myString.getBytes("UTF8")));
HttpResponse response = this.execute(post);
我現在想訪問服務器端的字符串。處理方法如下所示:
public void handle(String target, Request baseRequest, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException { ... }
該請求只允許我訪問內容的長度和類型,而不是內容本身。任何指針?
我使用java作爲一個pl,並從javax.servlet中構建類。
您可能想告訴我們您正在使用什麼樣的(網絡)服務器,以及編程語言/框架。 – 2013-03-21 17:30:56