EOSIO/eosio-swift

RPC: Check API Support When Making First Calls

Open

#71 opened on Apr 3, 2019

 (0 comments) (0 reactions) (0 assignees)C (36 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (63 stars)
PR merge metrics
 (PR metrics pending)

Description

Not all nodes support all node APIs. For example, many nodes do not support the History API. Instead of trying a call to an unsupported API, we should consider checking the get_supported_apis endpoint the first time we use the RPC instance. In that way, if History API is not supported, we can immediately return an error to the developer instead of blindly making the call and failing later.

Contributor guide