You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Davies,Douglas" <da...@oclc.org> on 2011/05/06 19:48:41 UTC
osapi and use of delete keyword?
We are developing our own osapi service and noticed an issue with naming
the rpc method 'delete'. It seems to cause issues for Safari. It works
fine on Firefox. If I try the code below on Safari I will never see the
alert. However if I change osapi.people.delete to osapi.people.delete2,
then I see the alert. The function is not being called. Just the
existence of the function is causing problems. In IntelliJ it
highlights the d in delete with an error saying "name expected". Ideas?
<html>
<body>
<script type='text/javascript'
src='/opensocial/gadgets/js/container:rpc.js?c=1&debug=1&nocache=1&conta
iner=default'></script>
<script type="text/javascript">
function deletepeople()
{
osapi.people.delete({ userId: '@viewer', groupId: '@friends',
person: { id: 'me' } });
}
alert('hello');
</script>
</body>
</html>
Multipart/form-data support
Posted by "lukasz.uruski@nasza-klasa.pl" <lu...@nasza-klasa.pl>.
Hi
I've tried to upload some content using multipart/form data, but I
think that Shindig does not support it.
When I generated such request (example at the bottom),
DataServiceServlet throws InvalidContentTypeException.
There is unresolved task
(https://issues.apache.org/jira/browse/SHINDIG-876), that contains patch
introducing changes in DataServiceServlet, that I think are necessary.
According to Paul Lindner's comment, this patch no longer applies, but I
do not understand why ? Could anybody explain me that ?
best regards
Lukasz
POST
http://172.17.254.10:2080/v09/social/rest/mediaItems/@me/@friends/1?nk_token=xHtkNea0bdNYRTOziTrarBAuKaLDxMIy6EZ7FxrW0CLLIbX5UCNGdeVkoNQr6ge0ZpS9rKjA5CtwT3_BhENG-m2qeC2wunfc4gF2uu0-xfHdhzQntEx0ZrD5V_kO7XN_pYL1Vw
POST data:
--bzkgtpuMOaLwTg-Usi87JsBQJxzBQBcCzyQvuv
Content-Disposition: form-data; name="file"; filename="sample.jpg"
Content-Type: image/jpg
Content-Transfer-Encoding: binary
<actual file content, not shown here>
--bzkgtpuMOaLwTg-Usi87JsBQJxzBQBcCzyQvuv--
[no cookies]
Request Headers:
Content-Type: multipart/form-data;
boundary=bzkgtpuMOaLwTg-Usi87JsBQJxzBQBcCzyQvuv
Content-Length: 143124
Authorization: OAuth oauth_signature_method="HMAC-SHA1",
oauth_body_hash="aVK0QHxn8L0siWUzKnKQ88ZM2rw%3D",
oauth_consumer_key="1fGFOOS6H9UvZ4kv", oauth_timestamp="1305111503",
oauth_nonce="13683522549444", oauth_version="1.0",
oauth_signature="NQa5rN%2BIe3uLPP7fd%2Bo5NIYCKD0%3D"
Connection: close
RE: osapi and use of delete keyword?
Posted by "Davies,Douglas" <da...@oclc.org>.
Answering myself...
osapi.people['delete']
From: Davies,Douglas
Sent: Friday, May 06, 2011 1:49 PM
To: 'dev@shindig.apache.org'
Subject: osapi and use of delete keyword?
We are developing our own osapi service and noticed an issue with naming
the rpc method 'delete'. It seems to cause issues for Safari. It works
fine on Firefox. If I try the code below on Safari I will never see the
alert. However if I change osapi.people.delete to osapi.people.delete2,
then I see the alert. The function is not being called. Just the
existence of the function is causing problems. In IntelliJ it
highlights the d in delete with an error saying "name expected". Ideas?
<html>
<body>
<script type='text/javascript'
src='/opensocial/gadgets/js/container:rpc.js?c=1&debug=1&nocache=1&conta
iner=default'></script>
<script type="text/javascript">
function deletepeople()
{
osapi.people.delete({ userId: '@viewer', groupId: '@friends',
person: { id: 'me' } });
}
alert('hello');
</script>
</body>
</html>