Ok so I have server running
I create user via CLI (it works)
curl -vX POST -H 'Content-Type: application/json' -d '{"name": "test", "password": "123456"}' :4985/sync_gateway/_user/
-
works ok
-
login via CLI
curl -vX POST -H 'Content-Type: application/json' -d '{"name": "test", "password": "123456"}' :4984/sync_gateway/_session
works also OK, I retreived
* Trying ::1...
* Connected to (::1) port 4984 (#0)
> POST /sync_gateway/_session HTTP/1.1
> Host: :4984
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 38
>
* upload completely sent off: 38 out of 38 bytes
< HTTP/1.1 200 OK
< Content-Length: 103
< Content-Type: application/json
< Server: Couchbase Sync Gateway/1.2.0
< Set-Cookie: SyncGatewaySession=724a41523848f38971d09319d819678734107201; Path=/sync_gateway; Expires=Thu, 14 Jul 2016 14:26:36 GMT
< Date: Wed, 13 Jul 2016 14:26:36 GMT
<
* Connection #0 to host left intact
{"authentication_handlers":["default","cookie"],"ok":true,"userCtx":{"channels":{"!":1},"name":"test"}}
- login with postman body response (name is missing)
{
"authentication_handlers": [
"default",
"cookie"
],
"ok": true,
"userCtx": {
"channels": {
"!": 1,
"*": 1
},
"name": null
}
}
- response headers (note that Set-Cookie param is missing)
Content-Length →107
Content-Type →application/json
Date →Wed, 13 Jul 2016 14:30:17 GMT
Server →Couchbase Sync Gateway/1.2.0
I have the same response from Coucbase GW, when I make server(PHP) POST request to Couchbase GW ( I’m using https://packagist.org/packages/guzzlehttp/guzzle )
- please help