Confirmed users
927
edits
Tarek.ziade (talk | contribs) |
Tarek.ziade (talk | contribs) |
||
| Line 85: | Line 85: | ||
The only valid HTTP response codes are 200 and 304 since those are part of the protocol and expected to happen. Anything else, like 400, 404 or 503 must result in a complete termination of the password exchange. The client can retry the exchange then at a later time, starting all over with clean state. | The only valid HTTP response codes are 200 and 304 since those are part of the protocol and expected to happen. Anything else, like 400, 404 or 503 must result in a complete termination of the password exchange. The client can retry the exchange then at a later time, starting all over with clean state. | ||
Every call must be done with a X-Weave-ClientID header, containing an identifier for the client. This id must be a string of at least 32 chars and at most 256 chars. It can be created with a md5 or sha hash of a random number for instance. The server will keep track of the two first ids used for a given channel, from its creation to its deletion and will close the channel and issue a 400 if any request is made with an unkown id or with no id at all. | Every call must be done with a ''X-Weave-ClientID'' header, containing an identifier for the client. This id must be a string of at least 32 chars and at most 256 chars. It can be created with a md5 or sha hash of a random number for instance. The server will keep track of the two first ids used for a given channel, from its creation to its deletion and will close the channel and issue a 400 if any request is made with an unkown id or with no id at all. | ||
The server API knows four calls: | The server API knows four calls: | ||
| Line 135: | Line 135: | ||
'''DELETE''' '''https://''server''/''channel_id'' ''' | '''DELETE''' '''https://''server''/''channel_id'' ''' | ||
Delete the channel of id ''channel_id''. If the response | Delete the channel of id ''channel_id''. If the response body is not empty, it will be used to issue a security log. The body size is limited to 1000. | ||
Return codes: | Return codes: | ||