Results 1 to 3 of 3
  1. #1
    DC200 is offline Member
    Join Date
    Dec 2008
    Rep Power

    Default HTTP POST over sockets

    Is there any way of sending multiple HTTP POSTs over a single socket and connection?

    Right now I'm having to create a new connection and then write the POST bytes to the socket's output stream. If I try to loop this method, it only does it once and then for some reason doesn't send anything after that. I can only fix this by creating a new socket for each iteration of the loop, but I'd like a way around that.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    Does the server you are communicating with support it?
    What does CONNECTION: keep-alive do for this?

  3. #3
    Horcrux7 is offline Member
    Join Date
    Sep 2010
    Rep Power


    Why do you not use a URLConnection? The working with a socket seems complicated for a HTTP connection.

Similar Threads

  1. HTTP Post working with WCF webservice
    By harshal82 in forum Advanced Java
    Replies: 0
    Last Post: 09-03-2010, 07:36 PM
  2. HTTP Post Request from Java
    By Darrarski in forum New To Java
    Replies: 10
    Last Post: 06-05-2010, 06:22 PM
  3. HTTP Post
    By erics44 in forum New To Java
    Replies: 0
    Last Post: 03-22-2010, 02:01 PM
  4. No location on http post
    By malandro95 in forum Advanced Java
    Replies: 2
    Last Post: 03-09-2010, 03:49 PM
  5. SOAP over HTTP/POST
    By sabatier in forum NetBeans
    Replies: 0
    Last Post: 07-10-2007, 09:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts