| 36 | self.document = self.document.replace('<replace_with_document_class_dont_remove>', '<div class="message"><div class="style outgoing">' + text + '</div></div><replace_with_document_class_dont_remove>') |
| 37 | |
| 38 | def redirect (self, target): #Redirects to a HTTP target. Generated HTML will be deleted and locked |
| 39 | self.chat_style = False |
| 40 | self.document = '' |
| 41 | self.response = 302 |
| 42 | self.header = ["Location", target] |
| 43 | |
| 44 | def request (self, url): #Sends a HTTP request (useful for HTTP APIS). If you don't need the response, you can do this after calling send. This will decrease loading time in the browser |
| 45 | f = urllib.request.urlopen(url) |