【问题标题】:How to send Http response to specific requestLine in python?如何在python中向特定的requestLine发送Http响应?
【发布时间】:2017-10-07 11:28:27
【问题描述】:

我可以在收到请求的函数之外向特定的 requestLine 发送 http 响应吗? 例如,我收到请求,然后将此请求传递给某些函数,如果允许,我想发送对此请求的响应?

【问题讨论】:

标签: python http request response


【解决方案1】:

如果您要拆分程序所采用的路径,因此它同时做两件不同的事情,那么您需要利用像线程/进程/事件/异步这样的控制流结构.

您可能想看看 Celery (http://www.celeryproject.org/) 和 Jobtastic (http://policystat.github.io/jobtastic/)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-29
    • 1970-01-01
    相关资源
    最近更新 更多