Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 recive post request from client(browser) python sockets
i am writing a simple webserver without using any libraries in python i am trying to recive a post request from the browser


<form method="POST"> <input type="text" /> <input type="submit" /> </form>
python file

request = client_connection.recv(1024)
print request
so if i type HELLO WORLD! in the input box and press submit i get this response

POST / HTTP/1.1 Host: Connection: keep-alive Content-Length: 0 Cache-Control: max-age=0 Origin: Upgrade-Insecure-Requests: 1 Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Cookie: PHPSESSID=k2ae5h3v8esmiij1eu1mff7ju6; FAea2c25b156a4d770f5eb3b4a876d1c4a=n2nu253hf3bq8oduq4chvuk0i3
i can not find the word HELLO WORLD! anywhere

how can i read the post request in python

buran wrote Dec-13-2018, 08:21 AM:
Please, use proper tags when post code, traceback, output, etc.
See BBcode help for more info.
the name tag was missing i fixed it

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Python server(Django web site)/client(Python app) connection Junior_Pythoneer 5 245 Jul-05-2019, 05:41 PM
Last Post: noisefloor
  Script Conversion 2.7 to 3 (sockets) Pumpernickel 1 299 Apr-10-2019, 04:26 PM
Last Post: Pumpernickel
  How to combine data taken from server between client and GUI? bescf 9 565 Apr-02-2019, 11:48 AM
Last Post: bescf
  Graphql subscriptions client Edoar 0 236 Mar-11-2019, 04:13 PM
Last Post: Edoar
  TCP/IP client script help Rehan11 2 536 Jan-15-2019, 06:48 AM
Last Post: Rehan11
  socket programming (browser) kunz 8 875 Dec-18-2018, 10:13 AM
Last Post: siripriya
  Scapy, creating response for GET request. SyRex1013 4 703 Dec-11-2018, 07:39 AM
Last Post: SyRex1013
  What sort of things can I write to learn about sockets marienbad 2 550 Oct-16-2018, 04:02 PM
Last Post: buran
  GET Request and JSON response montyonthebonty 9 1,211 Sep-27-2018, 07:28 AM
Last Post: buran
  unix domain sockets Skaperen 8 1,111 Sep-02-2018, 07:02 PM
Last Post: Skaperen

Forum Jump:

Users browsing this thread: 1 Guest(s)