How to retrieve HTTP POST events

J

Jacob

I have sent a request to some network server and will get
the response as a HTTP POST message on a specified socket.

How do I write a Java daemon that will listen for this response?

Thanks!
 
J

Jacob

Jacob said:
I have sent a request to some network server and will get
the response as a HTTP POST message on a specified socket.

How do I write a Java daemon that will listen for this response?

I've made an attempt along the lines of:

ServerSocket serverSocket = new ServerSocket (80);
Socket socket = serverSocket.accept();
System.out.println ("connection");

But it never pass the accept() method (i.e. no connections are
apparently made). I haven't verified if the POST event is actually
sent, but at this point I assume any bugs are on my side :)

How do I proceed? Are there any security issues? How can I verify
the HTTP POST (is there a log)? BTW: I run the code on linux as root.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top