Simple ruby TCP request doesn't hit the server -
i have simple ruby script upload file server/web app through tcp connection doesn't work.when run script nothing happens on web app/server side.the server works fine have tried upload file curl , did upload.take @ code below , let me know doing wrong.i using ruby 1.9.2-p290.thank in advance. require 'socket' host = "myapp.herokuapp.com" port = 80 client = tcpsocket.open(host, port) client.print("post /api/binary http/1.1\r\n") client.print("host: myapp.herokuapp.com\r\n") client.print ("accept: */* \r\n") client.print ("content-type: multipart/form-data;boundary=aab03x \r\n") client.print("\n" + "aab03x"+ "\n" "content-disposition: form-data; name='datafile'; filename='cam.jpg' \n content-type: image/jpeg \r\n") client.print ("\r\n") data = file.open("./pic.jpg", "rb") {|io| io.read} client.print (data) client.print ("\r\