我正在使用TastyPie制作内部API.我有
from tastypie.authentication import ApiKeyAuthentication
class MyResource(ModelResource):
Meta:
authentication = ApiKeyAuthentication()
Run Code Online (Sandbox Code Playgroud)
禁用Auth规则后,我的API运行良好.有了它,无论我尝试什么,我都会收到401(未经授权)的回复.
我确信这是一旦你看到它在行动中非常明显的事情之一,但在此期间,请告知如何提出请求(GET).