【发布时间】:2016-03-22 05:26:26
【问题描述】:
我需要为 Delphix 编写一个 RESTful web 服务客户端。我是 delphix 和 RESTful webservices 的新手。如何根据以下 curl 编写客户端。
创建 Delphix API 会话
$ curl -s -X POST -k --data @- http://delphix-server/resources/json/delphix/session\ -c ~/cookies.txt -H "内容类型:应用程序/json"
Delphix Login
$ curl -s -X POST -k --data @- http://delphix-server/resources/json/delphix/login \
-b ~/cookies.txt -H "Content-Type: application/json" <<EOF { "type": "LoginRequest", "username": "delphix_username", "password": "delphix_password" } EOF
请帮忙
【问题讨论】:
-
你已经尝试了什么?你被困在哪里了?
-
Evgeny Lebedev 我知道如何编写一个 RESTful 客户端来使用该服务。但我不知道如何为 Delphix 编写客户端。Delphix Web 服务 API 为每个操作提供 curl 命令。跨度>