你如何返回app引擎python端点的部分响应?

编程入门 行业动态 更新时间:2024-10-19 17:18:25
本文介绍了你如何返回app引擎python端点的部分响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在学习端点,并看到其他Google API具有此字段查询属性。 此外,它也出现在api资源管理器中。

我也想为我的api获得部分响应,但是当使用api资源管理器中的字段选择器时,它会被服务器忽略。 是否需要在服务器端实现某些功能? 在文档中找不到任何内容。 欢迎任何帮助。

我假设他们是否让我们知道,它可能需要注释,并可能覆盖一个或两个方法。

我也一直在寻找,无济于事。 我一直在寻找这只是由于相关的问题,我想知道如何在来自我的谷歌端点API的响应中强制JSON对象,甚至包括类的成员空值。 我试图查看是否会返回任何东西,如果我使用了一个字段的部分响应,表明它是空的。答案是否至少有属性,或者它甚至不会作为属性存在。 / p>

无论如何,这导致我进入相同的研究,我不相信我们可以在我们自己的API中启用部分响应。

I am learning endpoints and saw that other Google APIs have this "fields" query attribute. Also it appears in the api explorer.

I would like to get a partial response for my api also, but when using the fields selector from the api explorer it is simply ignored by the server. Do I need to implement something in the server side? Haven't found anything in the docs. Any help is welcome.

解决方案

From what I gather, Google has enabled partial response for their APIs, but has not yet explained how to enable it for custom APIs. I'm assuming if they do let us know, it might entail annotations, and possibly overriding a method or two.

I've been looking also, to no avail. I've been looking into this just due to a related question, where I'd like to know how to force the JSON object in the response from my google Endpoint API, to include even the members of the class that are null valued. I was trying to see if anything would be returned if I used a partial response with a field indicated that was null.. would the response have the property at least, or would it still not even exist as a property.

Anyway, this lead me into the same research, and I do not believe we can enable partial responses in our own APIs yet.

更多推荐

你如何返回app引擎python端点的部分响应?

本文发布于:2023-11-28 07:17:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641436.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:引擎   app   python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!