I have Python 2.7.9 running on a linux box. Now I need to start a http server to accept post requests with payloads (post body). However, due to some restriction, I cannot use pip to install some third party modules. Can I achieve this with Python out of the box?
            Asked
            
        
        
            Active
            
        
            Viewed 737 times
        
    0
            
            
        - 
                    1That is a very silly restriction. As viach points out you can definitely to it with standard-library modules, but you shouldn't expect it to be very efficient. – Daniel Roseman May 06 '16 at 07:58
- 
                    Use [bottle](http://bottlepy.org/), the one file http server framework. – Daniel May 06 '16 at 08:26
1 Answers
0
            Yep, it could be done with BaseHTTPServer.BaseHTTPRequestHandler from Python standard library.
See https://stackoverflow.com/a/31393963/3070670, nice working example is described there.
 
    
    
        Community
        
- 1
- 1
 
    
    
        Viach Kakovskyi
        
- 1,487
- 1
- 14
- 21
