• python之flask框架


    flask简单介绍

    flask使用

     

    踩的坑

    1.从postman发请求是ok的,但是从命令发curl 命令请求失败,为什么?

    ---原因:postman对参数进行了编码,空格会urlencode编码成%20,curl的时候空格没有编码,所以会失败。

    话说:urlencode是编码的目的是什么?---因为在web服务器中,接收的参数是不允许出现空格的。所以urlencode能够实现把空格和其他特殊字符进行编码,便于web服务器接收。

     2.请求返回internal error

    报错信息如下:

    dp-8f54d9e725-5b5b9dcc59-46qzc(boe.liurong_demo.httpserver_demo@default:boe_feature1):mysql# curl --location --request POST 'http://127.0.0.1:8220/ReadDBByPsm?db_psm=toutiao.mysql.liurong1018_read&sql_cmd=show%20databases;'
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <title>500 Internal Server Error</title>
    <h1>Internal Server Error</h1>
    <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

    参考

    大道至简
  • 相关阅读:
    node
    前端工程师的思考
    前端工程师需要具备的条件
    产品经理必须掌握的名词
    金融人必须掌握的词汇
    央企降两金、降杠杆的 “兵器谱”
    抽屉协议
    清分、清算、结算的关系
    如何有效规避风险
    浅谈在项目管理过程中风险管理
  • 原文地址:https://www.cnblogs.com/liurong07/p/15498718.html
Copyright © 2020-2023  润新知