0

我正在使用 PHP Odata SDK ( http://odataphp.codeplex.com/ )。文档和社区似乎非常有限。

我正在尝试将对象保存到 OData 服务并检索响应。当我执行该方法时,它成功地将对象保存到 OData 服务,但只是返回成功或真结果。它应该返回我刚刚添加的对象的 ID(它确实如此)。

$user = Users:CreatUser(array_of_data);
$proxy->AddUser($user);
$proxy->SaveResult();

如何从 OData 服务检索实际响应?

我努力了:

$result = $proxy->SaveResult();

但这不起作用。

4

1 回答 1

0

The location of the newly created entry should be returned in the Location header of the response, per the AtomPub specification.

If you were to surf to the location returned by the server in response to a successfully created entry, you should see an entry that looks exactly like the one in the HTTP POST response.

于 2013-04-01T21:19:49.923 回答