I would like to receive the body (all of his entity) of a http post.
I use this:
- Code: Select all
DefaultHttpServerConnection serv_con = new DefaultHttpServerConnection
();
serv_con.bind(client_socket, new BasicHttpParams());
HttpRequest header = serv_con.receiveRequestHeader();
BasicHttpEntityEnclosingRequest http_enclo = new
BasicHttpEntityEnclosingRequest(header.getRequestLine());
serv_con.receiveRequestEntity(http_enclo);
HttpEntity ent = http_enclo.getEntity();
And this simple form (get it first with a GET request):
- Code: Select all
<html>
<body>
<form enctype="multipart/form-data" method="post" action="">
<input type="text" value="abcdefghijk" name="text"/>
<input type="submit" value="Submit"/>
</form>
</body>
</html>
But the stream ent.getContent() not contain any data :/ !
I think i don't understand ^^ !
How i can receive one or more entity of a post request ?
Thank in advance
