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

    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 online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,548
    Rep Power
    23

    Default

    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
    Posts
    33
    Rep Power
    0

    Default

    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, 06:36 PM
  2. HTTP Post Request from Java
    By Darrarski in forum New To Java
    Replies: 10
    Last Post: 06-05-2010, 05:22 PM
  3. HTTP Post
    By erics44 in forum New To Java
    Replies: 0
    Last Post: 03-22-2010, 01:01 PM
  4. No location on http post
    By malandro95 in forum Advanced Java
    Replies: 2
    Last Post: 03-09-2010, 02:49 PM
  5. SOAP over HTTP/POST
    By sabatier in forum NetBeans
    Replies: 0
    Last Post: 07-10-2007, 08: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
  •