You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use Http module in substrate/core/offchain
This module is composed of two structs: [`HttpApi`] and [`HttpWorker`]. Calling the [`http`]
function returns a pair of [`HttpApi`] and [`HttpWorker`] that share some state.
The [`HttpApi`] is (indirectly) passed to the runtime when calling an offchain worker, while
the [`HttpWorker`] must be processed in the background. The [`HttpApi`] mimicks the API of the
HTTP-related methods available to offchain workers.
The reason for this design is driven by the fact that HTTP requests should continue running
(i.e.: the socket should continue being processed) in the background even if the runtime isn't
actively calling any function.
substrate/core/offchain
Reference for requesting code
Using
coinmarketcap api
to request BTC/USD price, JS code sampleThe text was updated successfully, but these errors were encountered: