DENY LESTER COELLO wrote:
I setup a proxy so I can record the interaction with the API.
here is the full request response. I’m sending the same headers when I call the getBookings function and I have no error. However when I call editBook
this is what I get:
{
"predicates": [
{
"deepEquals": {
"headers": {
"Content-Type": "application/json-rpc",
"x-company-login": "sleeping",
"x-token": "f328936e51b206b6d392945820ad135197a1fb1084654602629bc8fcc176a009",
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"User-Agent": "Java/1.7.0_80",
"Host": "192.168.99.100:3535",
"Accept": "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2",
"Connection": "keep-alive",
"Content-Length": "133"
}
}
},
{
"deepEquals": {
"body": "{\"id\":\"1009146949\",\"jsonrpc\":\"2.0\",\"method\":\"editBook\",\"params\":[5,1,4,1,\"2017-12-17\",\"10:00:00\",\"2017-12-17\",\"05:00:00\",false,null]}"
}
}
],
"responses": [
{
"is": {
"statusCode": 200,
"headers": {
"Server": "nginx/1.1.19",
"Date": "Wed, 20 Dec 2017 03:12:06 GMT",
"Content-Type": "application/json",
"Content-Length": 121,
"Connection": "keep-alive",
"Keep-Alive": "timeout=20",
"X-Powered-By": "PHP/5.3.10-1ubuntu3.21",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, GET, OPTIONS",
"Access-Control-Allow-Headers": "content-type, x-company-login, x-application-token, x-user-token, x-token, x-requested-with"
},
"body": "{\"error\":{\"code\":-32000,\"message\":\"No entry is registered for key 'user'\",\"data\":null},\"id\":\"1009146949\",\"jsonrpc\":\"2.0\"}",
"_mode": "text",
"_proxyResponseTime": 369
}
}
]
}