Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to bind json parameter data with WEB API Url. So how can I bind it ?

Like that :: https://mainnet.infura.io/qhggowRXK7HIgXB0NEyw?jsonrpc=2.0?method=eth_blockNumber?params=[]?id=83

So can we build it like this ?

What I have tried:

This is URL :
https://mainnet.infura.io/qhggowRXK7HIgXB0NEyw


This is Parameters :
{
"jsonrpc":"2.0",
"method":"eth_blockNumber",
"params":[],
"id":83
}
Posted
Updated 27-Jun-18 0:21am
v2
Comments
Richard Deeming 27-Jun-18 9:29am    
That's not a valid URL. After the first ?, subsequent parameters should be separated with & characters.
.../qhggowRXK7HIgXB0NEyw?jsonrpc=2.0&method=eth_blockNumber&params=[]&id=83
Hardik Dhankecha 28-Jun-18 4:10am    
@Richard Deeming
It's valid URL. If we use it in POSTMAN then it will return perfect response. Right now I am using it in POSTMAN but now I want to use directly in my code so I want to translate it to URL with parameters.
Richard Deeming 28-Jun-18 6:43am    
Query string : Wikipedia[^]

Query string parameters need to be separated with & characters. The URL you have shown is separating them with ? characters.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900