我在RestClient中测试以下API,但我没有收到回复,因为我不知道如何传递--data" {' myuid':&#39 ; testuser1'}"
curl -k -v -c cookies.txt -b cookies.txt
-X POST
-H "Content-Type:application/json" -H "Accept: application/json"
--data "{'myuid':'testuser1'}"
"https://<isam address>/mgaapi/sps/apiauthsvc?PolicyId=urn:ibm:security:authentication:asf:mytotp"
我也附上了截图。
我应该如何正确传递--data&#34; {&#39; myuid&#39;:&#39; testuser1&#39;}&#34;在RestClient中从服务器获取响应?
答案 0 :(得分:0)
尝试使用少量(正确且必需的)格式化:
collection.Indexes.CreateOne(Builders<Student>.IndexKeys.Ascending("expireAt"),new CreateIndexOptions { ExpireAfter = new TimeSpan(0, 0, 60) });
格式是这样的:
的 curl -k -v -c cookies.txt -b cookies.txt
-X POST
-H "Content-Type:application/json"
-H "Accept: application/json"
--data '{"myuid":"testuser1"}'
https://<aa>/mgaapi/sps/apiauthsvc?PolicyId=urn:ibm:security:authentication:asf:mytotp
强>