一、get請求
頁面請求地址:http://127.0.0.1:5000/test/5?username=test
視圖函數接口路徑:/test/<int:id>
postman傳遞參數:使用GET請求方式傳參
注意:既可以獲取路徑上的參數也可以獲取postman傳遞的參數
二、post請求
頁面請求地址:http://127.0.0.1:5000/test/5
視圖函數接口:/test/<int:id>
postman傳遞參數:使用post請求方式傳參(post傳參的好處在於不會將參數放在路徑上)
注意:post傳遞json格式參數需要使用json.loads(request.get_data)接收並序列化參數