hi everyone,
I am having difficulties with crafting my first API-request over postman.
I have set up a chain, I have the explorer and the web-demo running successfully - pretty much default values everywhere:
chain1/multichain.conf:
rpcallowip=192.168.10.0/24
rpcuser=multichainrpc
rpcpassword=XXXX
chain1/params.dat:
default-network-port = 5759
default-rpc-port = 5758
chain-name = chain1
when running a command from the console, everthing works:
bbking@bc-debian:~/.multichain/chain1$ multichain-cli chain1 getinfo
{"method":"getinfo","params":[],"id":"37999825-1712336614","chain_name":"chain1"}
{
"version" : "2.3.3",
"nodeversion" : 20303901,
"edition" : "Community",
"protocolversion" : 20013,
"chainname" : "chain1",
"description" : "MultiChain chain1",
"protocol" : "multichain",
"port" : 5759,
now my first question is, do I connect from an external host over port 5759 or 5758?
I wanted to replicate the "getinfo" command from postman:
http://192.168.10.114:5758?method=getinfo¶ms=[]&id=13054619-1712335590&chain_name=chain1
I have populated the "params" tab with the parameters as you can see.
I also activated "Basic Authorization" with the credentials from multichain.conf
On the "headers" tab, I've set these key-value pairs:
"Content-type" : "application/json"
"Accept" : "application/json"
"Content-length" : the length of the parameter string starting from "?" in the example above.
Now, when I send the request to port 5759, I get a "Could not get response"
when I send the request to port 5758 with "Content-length" activated, it times out.
without "Content-length" activated, I instantly get a "404 Not found"
Can someone help me with what am I doing wrong?
Thanks a lot in advance!