我有以下请求和响应内容。
REQUEST
HTTP/1.1 POST /identity/v1/users
Content‐Type: application/json
Accept: application/json
{
"firstName" : "foo", "lastName" : "bar", "email" : "test@test.com", "password" : "secret123ABC"
}
RESPONSE
HTTP/1.1 201 Created
{"id":111985014}
我试图使用curl命令来获取响应,但我得到了不同的错误,并且不明白该怎么做。如果有人知道,请帮忙。
答案 0 :(得分:0)
试试这个:
curl -XPOST http://<your-domain>/identity/v1/users -H "Content‐Type: application/json" -H "Accept: application/json" -d '{"firstName" : "foo", "lastName" : "bar", "email" : "test@test.com", "password" : "secret123ABC"}'