Azure 数据表 JS SDK - 如何设置请求标头 - contentType: application/json;odata=nometadata
问题:有没有办法设置请求头项 内容类型:application/json;odata=nometadata 在调用 TableClient.listEntities 之前。 目标:接收包含 odata 元数据的整洁的数据有效负载。
我正在使用 Azure 数据表 JavaScript API,并且希望按如下方式指定请求标头项:-
contentType: application/json;odata=nometadata
我已查看文档 (https://learn.microsoft.com/en-us/javascript/api/@azure/data-tables/?view=azure-node-latest),并且有一些方法可以帮助更改请求标头,例如TableInsertEntityHeaders接口包括属性“contentType”。
TableClient.listEntities 方法包含一个参数(选项?:ListTableEntitiesOptions),该参数不包含标头访问。因此,据我所知,API 没有提供明显的功能来更改请求标头。
谢谢
Question: is there a way to set the request header item
contentType: application/json;odata=nometadata
prior to a call to TableClient.listEntities.
Objective: to receive data payloads uncluttered with odata metadata.
I am using the Azure Data Tables JavaScript API, and would like to specify request header item as follows:-
contentType: application/json;odata=nometadata
I've looked through the documentation (https://learn.microsoft.com/en-us/javascript/api/@azure/data-tables/?view=azure-node-latest) and there are some methods which facilitate changes to the request header, e.g. TableInsertEntityHeaders interface includes a property 'contentType'.
the TableClient.listEntities method includes a parameter (options?: ListTableEntitiesOptions) which does not include header access. So, as far as I can see, there is no obvious functionality supplied by the API to change the Request Header.
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在查询选项中的
format
参数中指定它。请参阅下面的示例代码:You can specify this in
format
parameter in the query options. Please see the sample code below: