Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from twisted.web import server, resource
from twisted.internet import reactor
class HelloResource(resource.Resource):
isLeaf = True
def render_GET(self, request):
request.setHeader("content-type", "text/plain")
return "I am a stupid HTTP server!"
reactor.listenTCP(8080, server.Site(HelloResource()))
reactor.run()
@hidayatrakhman

This comment has been minimized.

Copy link

@hidayatrakhman hidayatrakhman commented Jul 2, 2014

salam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.