我需要返回一个字符串(纯文本)而不是 JSON(类消息)。
这是我现在的代码:
@endpoints.method(
# This method takes a ResourceContainer defined above.
Site_resource,
# This method returns an Echo message.
Site_response_new,
path='test',
http_method='POST',
name='testsystem')
def testsystem(self, request):
return Site_response_new(result=data)
我想要做 :
@endpoints.method(
# This method takes a ResourceContainer defined above.
Site_resource,
# This method returns an Echo message.
str,
path='test',
http_method='POST',
name='testsystem')
def testsystem(self, request):
return "awesome string"
谢谢<3