我是靠谱客的博主 明理可乐,这篇文章主要介绍接口中不需要登录的接口@base_request,现在分享给大家,希望可以做个参考。

def base_request(sub_post):
def inner(self, request):
if request.method == 'POST':
if request.content_type == 'application/json':
body = request.body.decode('utf-8')
if body == '':
json_data = {}
else:
json_data = json.loads(body)
else:
json_data = request.POST
else:
json_data = request.GET
return sub_post(self, request, json_data)
return inner

转载于:https://www.cnblogs.com/meili970202/p/11283856.html

最后

以上就是明理可乐最近收集整理的关于接口中不需要登录的接口@base_request的全部内容,更多相关接口中不需要登录内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(112)

评论列表共有 0 条评论

立即
投稿
返回
顶部