1
我有连接到瓶的RESTful资源的路线:瓶不匹配的路由
api.add_resource(File, '/api/files/<int:id>')
如果我现在想通过
/api/files/89?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc0FkbWluIjp0cnVlLCJ1c2VySWQiOjEsImV4cCI6MTQ3OTg0MTcxN30.DkoPeMeXms9j0nzmEAsGKOpIi_cRyTf4m6mQJjl17o0
访问路径获得:
"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. You have requested this URI [/api/files/89] but did you mean /api/files/<int:id> or /api/files or /api/users/<int:id> ?"
如果我试着简单地说:
/api/files/89
没有查询参数,一切工作正常。
问题在哪里?
看起来您的密钥不是网址编码的。我相信那些'.'字符需要被正确编码。 – sytech
@sytech你可以直接在浏览器开发工具中尝试:''。 === encodeURIComponent('。')'给出'true'。所以,'.'不需要以某种方式编码。 –
@Lelsoos,你能否给我们提供错误信息中提到的其他路线? –