@endpoints.method(# This method takes a ResourceContainer defined above.ECHO_RESOURCE,# This method returns an Echo message.EchoResponse,path="echo",http_method="POST",name="echo",)defecho(self,request):output_message=" ".join([request.message]*request.n)returnEchoResponse(message=output_message)
Endpoints Frameworks 会拦截所有请求并执行所有必要的检查(例如身份验证),然后再将请求转发到 API 后端。当后端响应时,Endpoints Frameworks 会收集遥测数据并进行报告。您可以在 Google Cloud 控制台中的 Endpoints 服务页面上查看 API 的指标。
可使用带有或不带 API 管理功能的 Endpoints Frameworks。不带 API 管理功能的 Endpoints Frameworks 可免费使用。API 管理功能按照 Endpoints 价格页面的规定收费。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-25。"],[[["Cloud Endpoints Frameworks is a web framework designed for the App Engine standard Python 2.7 and Java 8 runtime environments, allowing you to generate REST APIs and client libraries."],["Endpoints Frameworks handles HTTP requests and responses, routing URLs to the appropriate code functions and converting return values to JSON, simplifying API development."],["Using annotations in Java and decorators in Python, Endpoints Frameworks lets you define the surface of REST APIs directly within your code without the need for a third-party web server."],["While not using the Extensible Service Proxy (ESP), Endpoints Frameworks provides built-in API management comparable to ESP, including request interception, authentication, and telemetry reporting."],["Endpoints Frameworks is limited to the App Engine standard Python 2.7 and Java 8 environments and does not support Node.js, PHP, Go, the App Engine flexible environment, Cloud Run, Compute Engine, or Google Kubernetes Engine."]]],[]]