DLTcollab / tangle-accelerator

Accelerate IOTA transactions by caching API requests and redirecting to faster alternatives
MIT License
23 stars 16 forks source link

The description of the Alfred API key does not match the wiki document #760

Open yillkid opened 4 years ago

yillkid commented 4 years ago

According the description of wiki. API token for Alfred of MAM send/receive should be optional, but it's not in actual test.

Reproduce:

Without x-api-key

Request:

curl http://node.deviceproof.org:6699/mam/send \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"data": {"seed": "IUFXQETKSHDYPFUDO9ILVCAVQIXOHXKCECZYFLPBNVIX9JUXQZJE9URQEEUWPWYZOIACTCGZX9IDIODCA","message": "this is testing message -1 "},"protocol": "MAM_V1"}'

Response:

{"message": "Internal service error"}

With x-api-key

Request:

curl http://node.deviceproof.org:6699/mam/send \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"x-api-key": "3bff60110c9f0e40628031b16dfefe2eb45a6b0c2237b49ef5109f9aa8eb19a8", "data": {"seed": "IUFXQETKSHDYPFUDO9ILVCAVQIXOHXKCECZYFLPBNVIX9JUXQZJE9URQEEUWPWYZOIACTCGZX9IDIODCA","message": "this is testing message -1 "},"protocol": "MAM_V1"}'

Response:

{"bundle_hash":"ANUZHQGYLNGZUIJKLOPGJCNBBVLSGOLLKDUTPXJKBIRIUKPLQXHH9YANGCYGNLTCLJAVRYLHFZDIPSQJW","chid":"CERTKXUBKWXPTUNCU9MIEJNWOSSKBPWQYSZ9DGGFYSBOCENNXIEFVLRJTU9FMKYFJQR9JVEQPVZQYADPS","msg_id":"T9OZCUWKRSJCHQAZPEZPF"}
splasky commented 4 years ago

Related #694.

howjmay commented 4 years ago

it has been handled in #694