query-{view_code} RPC Method
参数
request_type
字符串
正在加载...
finality
字符串
正在加载...
block_id
integer/string
正在加载...
account_id
字符串
正在加载...
退货
哈希
正在加载...
block_height
正在加载...
block_hash
正在加载...
code_base64
正在加载...
请求
1curl https://docs-demo.near-mainnet.quiknode.pro/ \2--request POST \3--header "Content-Type: application/json" \4--data '{"method": "query","params": {"request_type": "view_code", "finality": "final", "account_id": "prophet.poolv1.near"},"id":1,"jsonrpc":"2.0"}'
1curl https://docs-demo.near-mainnet.quiknode.pro/ \2--request POST \3--header "Content-Type: application/json" \4--data '{"method": "query","params": {"request_type": "view_code", "finality": "final", "account_id": "prophet.poolv1.near"},"id":1,"jsonrpc":"2.0"}'
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "query",6"params": {7"request_type": "view_code",8"finality": "final",9"account_id": "prophet.poolv1.near"10},11"id": 1,12“jsonrpc”: "2.0"13});1415var requestOptions = {16方法: 'POST',17标题: myHeaders,18正文: raw,19重定向: 'follow'20};2122fetch("https://docs-demo.near-mainnet.quiknode.pro/", requestOptions)23.然后(响应 => 响应.text())24.然后(结果 => 控制台.log(result))25.catch(error => 控制台.log('error', error));
1var myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34var raw = JSON.stringify({5"method": "query",6"params": {7"request_type": "view_code",8"finality": "final",9"account_id": "prophet.poolv1.near"10},11"id": 1,12“jsonrpc”: "2.0"13});1415var requestOptions = {16方法: 'POST',17标题: myHeaders,18正文: raw,19重定向: 'follow'20};2122fetch("https://docs-demo.near-mainnet.quiknode.pro/", requestOptions)23.然后(响应 => 响应.text())24.然后(结果 => 控制台.log(result))25.catch(error => 控制台.log('error', error));
1导入 请求2import json34url = "https://docs-demo.near-mainnet.quiknode.pro/"56有效载荷 = json.dumps({7"method": "query",8"params": {9"request_type": "view_code",10"finality": "final",11"account_id": "prophet.poolv1.near"12},13"id": 1,14“jsonrpc”: "2.0"15})16标题 = {17“Content-Type”: 'application/json'18}1920回复 = 请求.请求("POST", url, headers=headers, data=有效载荷)2122打印(响应.text)23
1导入 请求2import json34url = "https://docs-demo.near-mainnet.quiknode.pro/"56有效载荷 = json.dumps({7"method": "query",8"params": {9"request_type": "view_code",10"finality": "final",11"account_id": "prophet.poolv1.near"12},13"id": 1,14“jsonrpc”: "2.0"15})16标题 = {17“Content-Type”: 'application/json'18}1920回复 = 请求.请求("POST", url, headers=headers, data=有效载荷)2122打印(响应.text)23
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.near-mainnet.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port);8https.use_ssl = true9请求 = Net::HTTP::POST.new(url)10请求["Content-Type"] = "application/json"11请求.请求体 = JSON.dump({12"method": "query",13"params": {14"request_type": "view_code",15"finality": "final",16"account_id": "prophet.poolv1.near"17},18"id": 1,19“jsonrpc”: "2.0"20})2122回复 = https.请求(请求)23返回响应.read_body24
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.near-mainnet.quiknode.pro/")67https = Net::HTTP.new(url.host, url.port);8https.use_ssl = true9请求 = Net::HTTP::POST.new(url)10请求["Content-Type"] = "application/json"11请求.请求体 = JSON.dump({12"method": "query",13"params": {14"request_type": "view_code",15"finality": "final",16"account_id": "prophet.poolv1.near"17},18"id": 1,19“jsonrpc”: "2.0"20})2122回复 = https.请求(请求)23返回响应.read_body24