GETID
From flud
Note: the most up-to-date documentation of the protocol is the source code itself, at http://flud.org/tryit.html
Contents |
[edit] (GetID) GET /ID
Returns the unique nodeID for this node.
[edit] required parameters:
- Ku_e: integer value (not encoded). value of 'e' from requestor's public key.
- Ku_n: integer value (not encoded). value of 'n' from requestor's public key.
- port: integer value (not encoded). listen port.
- nodeID: public-key-derived nodeID
[edit] example request
GET /ID?Ku_e=65537&Ku_n=219465200492487358852924699755434207279&port=8080&nodeID=e183ec161603836e7661737a976156a568fd7909d49c479deb9344dedddd7cb2 http/1.1
(as in 'echo -en "GET /ID?Ku...\r\n\r\n" | nc localhost 8080', or 'telnet localhost 8080' and enter the line followed by two returns if you prefer).
[edit] possible responses
normal response
- code: 200 OK
- data: {'e': 65537L, 'n': 11039221884347155417876495626885265712671994431610140961362728075478169809434184199394442367713335336906113632263724263658082897083388719196451267729815867L}
response when node decides to 'walk away'
- code: 204 NO CONTENT
- data: error message
response for malformed request
- code: 400 BAD REQUEST
- data: error message