Skip to content

Commit

Permalink
Simplified more rpc docs code
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax authored Apr 29, 2024
1 parent b87106b commit 2074043
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .vitepress/scripts/rpc-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,16 @@ export async function generateRpcDocs() {
::: code-group
\`\`\`JavaScript
const res = await fetch(
'http://127.0.0.1:8648',
{
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: {
"jsonrpc": "2.0",
"method": "{{ methodName }}",
"params": [{{ parametersValues }}],
"id": 1
}
const res = await fetch('http://127.0.0.1:8648', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: {
"jsonrpc": "2.0",
"method": "{{ methodName }}",
"params": [{{ parametersValues }}],
"id": 1
}
);
});
const data = await res.json();
\`\`\`
Expand Down

0 comments on commit 2074043

Please sign in to comment.