github.com/lbryio/lbcd@v0.22.119/rpcclient/examples/bitcoincorehttp/README.md (about)

     1  Bitcoin Core HTTP POST Example
     2  ==============================
     3  
     4  This example shows how to use the rpcclient package to connect to a Bitcoin
     5  Core RPC server using HTTP POST mode with TLS disabled and gets the current
     6  block count.
     7  
     8  ## Running the Example
     9  
    10  The first step is to use `go get` to download and install the rpcclient package:
    11  
    12  ```bash
    13  $ go get github.com/lbryio/lbcd/rpcclient
    14  ```
    15  
    16  Next, modify the `main.go` source to specify the correct RPC username and
    17  password for the RPC server:
    18  
    19  ```Go
    20  	User: "yourrpcuser",
    21  	Pass: "yourrpcpass",
    22  ```
    23  
    24  Finally, navigate to the example's directory and run it with:
    25  
    26  ```bash
    27  $ cd $GOPATH/src/github.com/lbryio/lbcd/rpcclient/examples/bitcoincorehttp
    28  $ go run *.go
    29  ```
    30  
    31  ## License
    32  
    33  This example is licensed under the [copyfree](http://copyfree.org) ISC License.