我使用Python Eve编写了一个Web服务.我正在尝试对已创建的资源执行PUT请求.我在我的文件中定义了item_methodsas ,但是当我打电话时我得到以下响应: -PATCHsettings.py
{
"_status": "ERR",
"_error": {
"message": "The method is not allowed for the requested URL.",
"code": 405
}
}
Run Code Online (Sandbox Code Playgroud)
在请求有效负载和我正在点击的URL之后
网址: - http://127.0.0.1:5000/puburl/
请求有效负载: -
[
{
"puburl": "https://github.com/tushar",
"userid": "xFGellL",
"_etag": "714df986e0bf802962a6b8cb4b9b1513e1709d7b"
}
]
Run Code Online (Sandbox Code Playgroud)
我的settings.py文件如下: -
__author__ = 'sappal'
# pulling DBSchema from DBTableSchema
from DBSchema.DBTableSchema import DBTableSchema
from Configs import Configs
dbtableSchema = DBTableSchema()
# Let's just use the local mongod instance. Edit as needed.
# Please note …Run Code Online (Sandbox Code Playgroud)