获取寻息headers
This commit is contained in:
parent
a01f29d4a1
commit
2d53719338
|
@ -164,3 +164,6 @@ class SpClient:
|
||||||
"errors": errors
|
"errors": errors
|
||||||
})
|
})
|
||||||
Tlog(**self.log).save()
|
Tlog(**self.log).save()
|
||||||
|
|
||||||
|
def headers(self):
|
||||||
|
return self.headers
|
||||||
|
|
|
@ -157,6 +157,15 @@ class XxCommonViewSet(CreateModelMixin, CustomGenericViewSet):
|
||||||
xxClient.subscribe('lowpower', '/api/third/xunxi/c_lowpower/')
|
xxClient.subscribe('lowpower', '/api/third/xunxi/c_lowpower/')
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
|
@action(methods=['get'], detail=False,
|
||||||
|
permission_classes=[IsAuthenticated])
|
||||||
|
def headers(self, request, pk=None):
|
||||||
|
"""获取headers
|
||||||
|
|
||||||
|
获取headers
|
||||||
|
"""
|
||||||
|
return Response(xxClient.headers())
|
||||||
|
|
||||||
@action(methods=['post'], detail=False,
|
@action(methods=['post'], detail=False,
|
||||||
permission_classes=[IsAdminUser],
|
permission_classes=[IsAdminUser],
|
||||||
serializer_class=serializers.Serializer)
|
serializer_class=serializers.Serializer)
|
||||||
|
|
Loading…
Reference in New Issue