user1891: Playing around with litecoin json-rpc running on windows (the API is the same as bitcoin, so I am using bitcoin's references).
My litecoin.conf has the following data:
rpcuser=user
rpcpassword=pass
txindex=1

Based on the documentation I started the core client as .\litecoind.exe -server, and it looks like it works just fine because I can run various commands from another window (.\litecoin-cli.exe getblockcount and many other work as expected).
Now I wanted to make some json-rpc calls and I tried Go's library which bitcoin's developers recommend. I used the example from that library's github and the only modifications which I introduced were my user and pass in the definition of the ConnConfig.
The code fails during the execution of client.GetBlockCount() with an error: 

Post http://localhost:8332: dial tcp [::1]:8332: connectex: No
  connection could be made because the target machine actively refused
  it.

I think that the problem is with json-rpc server but I have no idea how to verify that it works properly. Any idea how to fix it?

user1891: I was using bitcoin's port. Should have provided a port for litecoin: 9332.

1891: <p>Playing around with litecoin json-rpc running on windows (the API is the same as bitcoin, so I am using <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow noreferrer">bitcoin's</a> references).</p>

<p>My <code>litecoin.conf</code> has the following data:</p>

<pre><code>rpcuser=user
rpcpassword=pass
txindex=1
</code></pre>

<p>Based on the <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#JSON-RPC" rel="nofollow noreferrer">documentation</a> I started the core client as <code>.\litecoind.exe -server</code>, and it looks like it works just fine because I can run various commands from another window (<code>.\litecoin-cli.exe getblockcount</code> and many other work as expected).</p>

<p>Now I wanted to make some json-rpc calls and I tried <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Go" rel="nofollow noreferrer">Go's library</a> which bitcoin's developers recommend. I used the <a href="https://github.com/btcsuite/btcd/blob/master/rpcclient/examples/bitcoincorehttp/main.go" rel="nofollow noreferrer">example from that library's github</a> and the only modifications which I introduced were my <code>user</code> and <code>pass</code> in the definition of the <code>ConnConfig</code>.</p>

<p>The code fails during the execution of <a href="https://github.com/btcsuite/btcd/blob/master/rpcclient/examples/bitcoincorehttp/main.go#L33" rel="nofollow noreferrer">client.GetBlockCount()</a> with an error: </p>

<blockquote>
  <p>Post <a href="http://localhost:8332" rel="nofollow noreferrer">http://localhost:8332</a>: dial tcp [::1]:8332: connectex: No
  connection could be made because the target machine actively refused
  it.</p>
</blockquote>

<p>I think that the problem is with json-rpc server but I have no idea how to verify that it works properly. Any idea how to fix it?</p>
 1891: <p>I was using bitcoin's port. Should have provided a port for litecoin: <code>9332</code>.</p>
