5

How do i convert this curl command:

curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getbalance"}' -H 'Content-Type: application/json'

Into a normal http url?

4

The HTTP url is: http://127.0.0.1:18082/json_rpc

When you mean with HTTP url, a url that you can type into your browser, than its not possible to achieve the same request with only the HTTP url. Alternative to curl you could use the chrome App Postman to play around with the json_rpc api. Postman

Post is the called HTTP method.

The -d is the payload, in this case the data that is send as Post request to that HTTP url.

The -H defines a HTTP header that is also send. In this case "Content-Type" is set, it describes the format the POST data is in. Its JSON.

Here is more information about curl. Link

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.