Updated example to be able to handle all HTTP methods over socket: GET, POST, PUT, DELETE