简体   繁体   English

是否可以从Azure cosmos db进行httprequest?

[英]Is it possible to make httprequest from Azure cosmos db?

I'm trying to learn Azure Cosmos Db. 我正在尝试学习Azure Cosmos Db。 I've read the document. 我已经阅读了文件。 As far as I see, we can create .Net/NodeJs/Java applications, and get/insert/update data in the Cosmos Db. 据我所知,我们可以创建.Net / NodeJs / Java应用程序,并在Cosmos Db中获取/插入/更新数据。

However, I'm not clear whether we can make a http request from JavaScript/JQuery/etc.. 但是,我不清楚我们是否可以从JavaScript / JQuery / etc发出http请求。

to fetch data: does cosmos db provide only .net/java/nodejs/phyton, or we can make a request using any software language? 获取数据:cosmos db仅提供.net / java / nodejs / phyton,还是我们可以使用任何软件语言发出请求?

Thanks in advance. 提前致谢。

Cosmos exposes a REST API, so you can access with anything capable of creating HTTP requests. Cosmos公开了REST API,因此您可以使用能够创建HTTP请求的任何内容进行访问。 Here's the API documentation https://docs.microsoft.com/en-us/rest/api/documentdb/ 这是API文档https://docs.microsoft.com/zh-cn/rest/api/documentdb/

I want to answer my question. 我想回答我的问题。 I tried to make an http request from Azure Cosmos DB and I did. 我试图从Azure Cosmos DB发出http请求,但确实做到了。

There is only one crucial step that you need to create an auth code for each request. 您只需为每个请求创建一个身份验证代码,就可以执行一个关键步骤。 You can create the auth code by reading below page 您可以通过阅读以下页面来创建身份验证代码

https://docs.microsoft.com/en-us/rest/api/documentdb/access-control-on-documentdb-resources?redirectedfrom=MSDN https://docs.microsoft.com/en-us/rest/api/documentdb/access-control-on-documentdb-resources?redirectedfrom=MSDN

This is the detailed document for using Cosmos DB Rest API. 这是使用Cosmos DB Rest API的详细文档。

https://docs.microsoft.com/en-us/rest/api/documentdb/restful-interactions-with-documentdb-resources https://docs.microsoft.com/en-us/rest/api/documentdb/restful-interactions-with-documentdb-resources

I hope this would be helpful. 我希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM