Diff: [root] @ fe48f746a43 | faq | css

Modification

File created: hellnet/protocols/http/handshake [Diff]

-- /dev/null++ b/hellnet/protocols/http/handshake
@@ -1 +1,27 @@
h1. *Handshake* resource

h2. Brief description

Introduce yourself to server

h2. Requests

h3. POST

h4. Parameters

* host -- Node hostname
* post -- Node port

h4. Description

Used to establish link between nodes. Server will then respond with @GET /hello@ to check whether information is true. If so, it will add client to its nodelist.

h4. Response

Always returns 200 OK status. Content may be one of:

* "OK" -- node was checked and added to nodelist
* "FAIL" -- node failed to be online when checked
* "EXISTS" -- node is already in nodelist

File: hellnet/protocols/http/hello [Diff]

-- a/hellnet/protocols/http/hello++ b/hellnet/protocols/http/hello
@@ -2,7 +2,7 @@

h2. Brief description

"Hello" resource is located by path @/hello@. It must respond to HEAD and GET with status 200 OK if server is working. Also it can respond to POST requests to collect sender's node information.

h2. Requests

@@ -19,23 +19,4 @@
h4. Response

Always returns 200 OK status.

h3. POST

h4. Parameters

* host -- Node hostname
* post -- Node port

h4. Description

Used to establish link between nodes. Server will then respond with @GET /hello@ to check whether information is true. If so, it will add client to its nodelist.

h4. Response

Always returns 200 OK status. Content may be one of:

* "OK" -- node was checked and added to nodelist
* "FAIL" -- node failed to be online when checked
* "EXISTS" -- node is already in nodelist

File: hellnet/protocols/http/index [Diff]

-- a/hellnet/protocols/http/index++ b/hellnet/protocols/http/index
@@ -4,8 +4,9 @@

h2. Query types

|_. Query |_. Path |_. Static/dynamic |_. Description | |_. Link
| GET | /chunks/([0-9a-f]+) | static | [[/hellnet/tech/chunk|Chunk]] with hash $1 |
| GET | /meta/([^/]+)/([^/]+) | static | List of chunks which are inserted with [[/hellnet/tech/metachunks|meta]] $1:$2 |
| GET, HEAD, POST HEAD | /hello | dynamic static | Check whether node is up | [[HTTP/hello]] |
| POST | /handshake | dynamic | Establish a link to node | [[HTTP/handshake]] |

By Voker57 on 2009-06-28 13:10:00 +0000