首页 \ 问答 \ 使用REST API获取SharePoint列表的不同数据(Get distinct data of SharePoint list using REST API)

使用REST API获取SharePoint列表的不同数据(Get distinct data of SharePoint list using REST API)

如何使用REST API获取SharePoint列表的不同列数据? 有没有办法实现它而不循环?

谢谢!


How to get distinct column data of SharePoint list using REST API? Is there a way to achieve it without looping?

Thanks!


原文:https://stackoverflow.com/questions/25744763
更新时间:2023-01-20 12:01

最满意答案

我遇到了同样的问题,在我的win7 x64笔记本电脑,并能够使用标签为Win64 - Generic w SSL的curl版本,使用非常相似的命令行格式使其工作:

C:\Projects\curl-7.23.1-win64-ssl-sspi>curl -H "Content-Type: application/json" -X POST http://localhost/someapi -d "{\"Name\":\"Test Value\"}"

其中仅与您的第二个转义版本不同,通过使用双引号围绕转义的和引用参数值。 绝对喜欢linux shell的语法更多。


I ran into the same issue on my win7 x64 laptop and was able to get it working using the curl release that is labeled Win64 - Generic w SSL by using the very similar command line format:

C:\Projects\curl-7.23.1-win64-ssl-sspi>curl -H "Content-Type: application/json" -X POST http://localhost/someapi -d "{\"Name\":\"Test Value\"}"

Which only differs from your 2nd escape version by using double-quotes around the escaped ones and the header parameter value. Definitely prefer the linux shell syntax more.

相关问答

更多
  • 2件事情完全不同,在你的PHP中你只能使用本手册PHP CURL中描述的curl库 在Windows操作系统上 ,要在命令行中使用curl,您必须从此URL下载并安装/部署curl包CURL Windows命令 2 things completely different, in your PHP you can only use curl library described in this manual PHP CURL On Windows OS, to use curl in command line ...
  • 正如@birryree所说,将msysgit的二进制文件添加到PATH中,或者使用Git Bash(尽可能安装msysgit),这比Windows的控制台更好,类似于Unix。 As @birryree said, add msysgit's binary to your PATH, or use Git Bash (installed with msysgit as far as I remember) which is better than Windows' console and similar t ...
  • 我遇到了同样的问题,在我的win7 x64笔记本电脑,并能够使用标签为Win64 - Generic w SSL的curl版本,使用非常相似的命令行格式使其工作: C:\Projects\curl-7.23.1-win64-ssl-sspi>curl -H "Content-Type: application/json" -X POST http://localhost/someapi -d "{\"Name\":\"Test Value\"}" 其中仅与您的第二个转义版本不同,通过使用双引号围绕转义的和 ...
  • 如果这个问题与您的其他Hudson问题相关联,请使用它们提供的命令。 $ curl -X POST -d '4142430A02000' \ http://user:pass@myhost/hudson/job/_jobName_/postBuildResult 您需要更改一点才能从文件中读取: $ curl -X POST -d @myfil ...
  • 将其包装到另一个cmd实例中并使用exit : cmd /c "for /l %i in (1,0,1) do @ping -n 1 google.com || (echo ^G & msg user "Google is down!" & exit)" Wrap it into another instance of cmd and use exit: cmd /c "for /l %i in (1,0,1) do @ping -n 1 google.com || (echo ^G & msg user ...
  • 如果我理解你的正确,你的卷曲是一个cli工具,所以你应该首先打开一个终端(控制台?),然后键入curl命令,你可能想要阅读man curl的详细信息,如何使用该工具。 只需双击卷曲将无法正常工作。 (我不熟悉Windows的东西,如果我错了,请纠正我)。 此外,如果您想发送电子邮件(通过smtp),您需要提供相关参数。 喜欢--mail-from, --mail-rcpt ...再次阅读curl手册。 If I understand you right, the curl you meant is a cl ...
  • 这就是我为解决问题所做的工作。 我从这里获得了Mozilla使用的Bundle of CA根证书。 我从页面复制了数据并将其保存在curl-ca-bundle.crt文件所在文件夹中名为curl-ca-bundle.crt的curl.exe文件中。 这解决了这个问题。 当然,这些说明也可以在SSL证书的cURL 文档页面上找到,正是说明4和5。 希望有所帮助。 Here's what I did to solve the problem. I got the Bundle of CA root certif ...
  • 每个卷曲调用都会提出一个请求。 看起来像您需要从POST更改为GET并使用-G,--get选项将值添加为参数之后? 请参阅如何使用cURL执行多个同时请求? HTH each curl call makes a single request. looks like you need to change from POST to GET and use the -G, --get option to add the values as parameters after the ? See How do I u ...
  • 重定向符号可以通过将它们放在双引号内来转义。 而不是说 'test' 你需要说 "test" Redirection symbols can be escaped by placing those within double quotes ". Instead of saying '
  • 请尝试使用此代码: $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)"); curl_setopt($ch, CURLOPT_URL, _VIRUS_S ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。