(html)
| 110 | |
| 111 | |
| 112 | def minify_html(html): |
| 113 | minify_req = requests.post( |
| 114 | 'https://www.toptal.com/developers/html-minifier/api/raw', |
| 115 | {'input': html.read().decode('utf-8')}, |
| 116 | timeout=10 |
| 117 | ) |
| 118 | return html if minify_req is False else minify_req.text.encode('utf-8') |
| 119 | |
| 120 | |
| 121 | # gzip web files |
no test coverage detected