我需要返回一个字符串(纯文本)而不是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
答案 0 :(得分:1)
不,目前无法实现。