CryptoLions / EOS-mongo-history-API

API to get actions using EOS mongo plugin (similar to history plugin)
MIT License
52 stars 24 forks source link

Drop in replacement? #4

Open dfguo opened 5 years ago

dfguo commented 5 years ago

Hi,

Can I use this as a dropin replacement for eosjs http endpoint? When querying get_actions, I get empty response:

› curl 'https://history.cryptolions.io/v1/history/get_actions' -H 'Content-Type: text/json;charset=UTF-8' --data-binary '{"account_name":"eosasia11111","pos":-1,"offset":-100}' --compressed

returns

{"actions":[]}

orange1337 commented 5 years ago

Hi @dfguo, Use application/json content type:. Try this command: curl -i -X POST -H 'Content-Type: application/json;charset=UTF-8' -d '{"account_name":"eosasia11111","pos":-1,"offset":-100}' --compressed https://history.cryptolions.io/v1/history/get_actions