SIGBlockchain / project_aurum

SIG Blockchain blockchain project in Go
https://acm.cs.uic.edu/sigblockchain
MIT License
7 stars 0 forks source link

Get request blockpub add peer #289

Closed kastolars closed 5 years ago

kastolars commented 5 years ago

Issue #285

kastolars commented 5 years ago

Looks good, but if we are posting the producer's IP and port to the web page you showed us on Monday, shouldn't we use a POST request rather than a GET request?

That's a great question. So while GET requests typically deliver some parameter in order to get a response back with some information, it doesn't necessarily always need to restricted to this type of service. If I only want to post say 1 or 2 parameters, like a login, we can do a GET request with those.

Incidentally, blockpub is configured to only accept GET requests on the peer/add endpoint:

https://github.com/SIGBlockchain/blockpub/blob/master/routes/web.php#L19