HTTP/HTTPS GET/POST JSON
Query any HTTP/HTTPS GET/POST with or without JSON.
Overview / explanation of the different options, links to github code.
HTTP(S) Get & Post:
https://ipfs.io/ipfs/Qmaisz6NMhDB51cCvNWa1GMS7LU1pAxdF4Ld6Ft9kZEP2a
- simply add the full URL pathHTTP(S)+JSON Get:
https+json://name/api.github.com/users/tmuskal
- prepend your uri withhttps+json
, then specify the key mapping path of your desired data point, in the example, thename
key is used as the requested data point. To request nested values beneath the first layer of keys, simple separate the desired data point with a.
, e.g.,name.value
. Then add the path to your desired data point:api.github.com/users/tmuskal
. Note you may usehttp+json
orhttps+json
.HTTP(S)+JSON Post:
https+post+json://timestamp/${body}/nodes.get-scatter.com:443/v1/chain/get_block
- where body isconst body = Buffer.from('{"block_num_or_id":"36568000"}').toString('base64')
. In this example you specify the type of request:https+post+json
then the key mappingtimestamp
then the body of the POST request, encoded in base64, then the URL pathnodes.get-scatter.com:443/v1/chain/get_block
.
Last updated
Was this helpful?