I'm trying to do a simple RAW data UPLOAD using the net library (not the net/http). I have a simple php script that just spits out whatever was sent to it. The problem is that the php script doesn't receive anything. What am I doing wrong?
conn, err := net.Dial("tcp", "127.0.0.1:80" )
fmt.Fprintf(conn, "POST /handleupload.php HTTP/1.0
")
n, err := conn.Write([]byte("ABCDEFGHIJ"))
status, err := bufio.NewReader(conn).ReadString('z')
fmt.Println( status )