Python Posting HTML to Browser?

Dkeki

New member
I've read in data from a file using a GET request through a browser

Code:
data= open(path) 
data2= file.read() 
return data2
[icode]

and returned it to the console just fine. how do I post this same data to the browser I used as a client for the GET request? socket.send(<htmlcode here>)? what does it look like? I can't just pass in <HTML><TITLE>This is the title</TITLE><BODY>data</BODY></HTML> tags 'n such, I have to incldue the header info I think with \r\ns... what is that header info that I need?
 
Back
Top