human
I wrote the below code

    def make_post(host, port, data):
        request = post('http://{host}:{port}'.format(host=host, port=port), data=data, timeout=SOCKET_TIMEOUT_FOR_POLLING, persistent=False)
        def failed(failure):
            Message.new(message_type=u'acceptance:http_query_failed', reason=unicode(failure)).write()
            return False
        request.addCallbacks(content, failed)
        return request
    d = verify_socket(host, port)
    d.addCallback((lambda _: loop_until(reactor, (lambda : make_post(host, port, data)))))
    d.addCallback(test.assertEqual, expected_response)
    return d

What's a good function header?
assistant
#Here's a good function header.

def post_http_server(test, host, port, data, expected_response='ok'):