Hi Stefan/ Ryan,
But if I try to upload the tabs data, I am getting 400 http error.
|
< HTTP/1.1 400 Bad Request < Server: openresty/1.7.0.1 < Date: Wed, 12 Nov 2014 11:03:32 GMT < Content-Type: application/json; charset=UTF-8 < Content-Length: 1 < Connection: keep-alive < X-Weave-Timestamp: 1415790212.00 * HTTP error before end of send, stop sending < * Closing connection #0 |
Here is my request header and body,
Header :
|
> POST /1.5/10196463/storage/tabs HTTP/1.1 Host: sync-141-us-west-2.sync.services.mozilla.com Accept: */* Authorization:Hawk id="eyJub2RlIjogImh0dHBzOi8vc3luYy0xNDEtdXMtd2VzdC0yLnN5bmMuc2VydmljZXMubW96aWxsYS5jb20iLCAiZXhwaXJlcyI6IDE0MTU3OTM2OTAsICJzYWx0IjogIjNiODE2NSIsICJ1aWQiOiAxMDE5NjQ2M31yD76V92FPl-lzc6dJs8_G3zHauZQyxWlNtHracyEXOA==", ts="1415790138", nonce="jdrU9aofv/c=", mac="MU4VnPrVckZ4tbq/g+63sxUbY2EzrUIirTc+6lZhWH0=" Content-Type: application/json charsets: utf-8 Content-Length: 288 |
Body :
|
[ {"ttl":604800, "id":"48:5A:3F:50:6F:61_0", "payload":"{"ciphertext":"riObd5rAAv6Fpj\/CnhLrM1Dxl5BB6fuGoHhCMk7kkLeinppK+lcwzM87rmN5NX8e8ZeKfFfzUWSGP6mIWXfaZggL0MjB2lcSibUaj5iDvuU=", "IV":"ybtBTctsolEtBt72SmY2qQ==", "hmac":"099e0638503b3ed0fcfa817c6cd57677ea869f50da96dea0084c48d7f12c9ed6"}" } ] |
Which is an array of json objects passed in body (overall as string “[{id,ttl, payload},{id,ttl, payload}]” ).
I also tried sending it as single json object but I was getting http 400 error message as well. (like “{id,ttl, payload}” ).
I went through the documents
https://docs.services.mozilla.com/storage/apis-1.5.html
Which says
“Like all JSON documents, BSOs are composed of unicode character data rather than raw bytes and must be encoded for transmission over the network.
The SyncStorage service always encodes BSOs in UTF8.”
If above provided request body is wrong, Can you please guide me on how to make the request for upsync with list of BSOs.
I am completely stuck at this stage,
It would be of great help if you guys can guide me on solving this issue.
Thanks in advance,
Regards,
Manoj
|
|
_______________________________________________ Dev-fxacct mailing list [email protected] https://mail.mozilla.org/listinfo/dev-fxacct

