eos-java-rpc-wrapper
eos-java-rpc-wrapper copied to clipboard
okhttp error end of stream
Caused by: java.io.EOFException: \n not found: limit=0 content=… at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:237) at okhttp3.internal.http1.Http1Codec.readHeaderLine(Http1Codec.java:215) at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
The code: ` import client.EosApiClientFactory; import client.EosApiRestClient; import client.domain.response.chain.AbiJsonToBin;
import java.util.HashMap; import java.util.Map;
public class Main {
public static void main(String[] args) {
EosApiRestClient eosApiRestClient;
eosApiRestClient = EosApiClientFactory.newInstance("http://127.0.0.1:8888").newRestClient();
//build payload
Map<String, String> arg = new HashMap(4);
arg.put("custacct", "consumer");
arg.put("account", "fimulti");
arg.put("name", "onboard");
AbiJsonToBin data = eosApiRestClient.abiJsonToBin("currency", "transfer", arg);
`
You should add following items in pom.xml for initialize eos_api_rest_client
`