Does Python have a module for parsing HTTP requests and responses?

后端 未结 3 976
攒了一身酷
攒了一身酷 2020-12-08 00:43

httplib (now http.client) and friends all have conn.getresponse() and an HTTPResponse class, but the server-side operations of conn.getrequest() and an HTTPRequest class see

3条回答
  •  Happy的楠姐
    2020-12-08 01:21

    For server-side processing you want to look at something like wsgiref.

    The WSGI standard parses the request into a simple dictionary with all of the relevant headers and elements.

提交回复
热议问题