Confirmed users
93
edits
Line 208: | Line 208: | ||
{"digest": "hash string", "updates": [{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}], "expired": ["channelID1", "channelID2", ...]} | {"digest": "hash string", "updates": [{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}], "expired": ["channelID1", "channelID2", ...]} | ||
==== POST /v1/update ==== | |||
<p>Refresh the server from the client. | <p>Refresh the server from the client. | ||
</p><p>This request requires a X-UserAgent-ID header. If the UserAgent attempts to POST information to the server which already has data for that X-UserAgent-ID, the server will deny the request with a 403 error. In that case, the UserAgent should request re-registration for all Channels. | </p><p>This request requires a X-UserAgent-ID header. If the UserAgent attempts to POST information to the server which already has data for that X-UserAgent-ID, the server will deny the request with a 403 error. In that case, the UserAgent should request re-registration for all Channels. | ||
</p> | </p> | ||
===== Arguments ===== | |||
<p>The POST body is a JSON encoded block which matches the form and structure of the GET /v1/update/ request. | <p>The POST body is a JSON encoded block which matches the form and structure of the GET /v1/update/ request. | ||
</p> | </p> | ||
===== Returns ===== | |||
<p>This will return an empty object. | <p>This will return an empty object. | ||
</p> | </p> | ||
===== Example ===== | |||
<pre class="_fck_mw_lspace">POST http://push.m.o/v1/update | <pre class="_fck_mw_lspace">POST http://push.m.o/v1/update | ||
{"channels":[{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}]} | {"channels":[{"channelID":"1ced595d7f6c9f60cc5c9395dc6b72aa7e1a69a7","version":"42"},{"channelID":"bf08e25861c900c3ab343670eee1873d0b724eef","version":"1"}]} |