/pallets/{palletId}/consts/{constantItemId} REST API Endpoint
路徑參數
palletId
字串
必填
載入中...
constantItemId
字串
必填
載入中...
查詢參數
at
字串
載入中...
元資料
布林值
載入中...
退貨
at
物件
載入中...
雜湊
字串
載入中...
高度
字串
載入中...
pallet
字串
載入中...
palletIndex
字串
載入中...
constantsItem
字串
載入中...
請求
1# AssetHub (default) - for pallet constants from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights' \3--header 'Accept: application/json'45# Polkadot Relaychain - for pallet constants from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/pallets/System/consts/BlockWeights' \7--header 'Accept: application/json'
1# AssetHub (default) - for pallet constants from AssetHub parachain2curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights' \3--header 'Accept: application/json'45# Polkadot Relaychain - for pallet constants from Relaychain (requires /rc prefix)6curl --location 'https://docs-demo.dot-mainnet.quiknode.pro/rc/pallets/System/consts/BlockWeights' \7--header 'Accept: application/json'
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Accept", "application/json");56const requestOptions = {7方法: "GET",8標題: myHeaders,9重定向: 「追蹤」10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights", requestOptions)13.接著((回應) => 回應.文字())14.接著((結果) => 控制台.log(結果))15.catch((error) => console.error(error));16
1// For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)23const myHeaders = new Headers();4myHeaders.append("Accept", "application/json");56const requestOptions = {7方法: "GET",8標題: myHeaders,9重定向: 「追蹤」10};1112fetch("https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights", requestOptions)13.接著((回應) => 回應.文字())14.接著((結果) => 控制台.log(結果))15.catch((error) => console.error(error));16
1匯入 請求2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)345url = "https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights"6有效載荷 = {}7標題 = {8「接受」: 'application/json'9}1011回應 = 請求.請求("GET", url, headers=headers, data=有效載荷)12列印(回應.text)13
1匯入 請求2# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)345url = "https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights"6有效載荷 = {}7標題 = {8「接受」: 'application/json'9}1011回應 = 請求.請求("GET", url, headers=headers, data=有效載荷)12列印(回應.text)13
1需要 "uri"2需要 "net/http"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)456url = URI("https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights")78https = 網::HTTP.new(url.主機, 網址.port)9https.use_ssl = true1011請求 = 淨額::HTTP::Get.new(url)1213回應 = https.請求(請求)14puts 回應。read_body15
1需要 "uri"2需要 "net/http"3# For Polkadot Relaychain access, add '/rc' after https://docs-demo.dot-mainnet.quiknode.pro/ (e.g., https://docs-demo.dot-mainnet.quiknode.pro/rc/accounts/...)456url = URI("https://docs-demo.dot-mainnet.quiknode.pro/pallets/System/consts/BlockWeights")78https = 網::HTTP.new(url.主機, 網址.port)9https.use_ssl = true1011請求 = 淨額::HTTP::Get.new(url)1213回應 = https.請求(請求)14puts 回應。read_body15