Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

okhttp error end of stream #40

Open
srmcatee1110 opened this issue Dec 14, 2018 · 1 comment
Open

okhttp error end of stream #40

srmcatee1110 opened this issue Dec 14, 2018 · 1 comment

Comments

@srmcatee1110
Copy link

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);

`

@Cavan2477
Copy link

You should add following items in pom.xml for initialize eos_api_rest_client

`
<com.squareup.retrofit2.version>2.5.0</com.squareup.retrofit2.version>
<converter-scalars.version>2.5.0</converter-scalars.version>
<okhttp.version>3.12.0</okhttp.version>

com.squareup.okhttp3 okhttp ${okhttp.version} com.squareup.okhttp3 logging-interceptor ${okhttp.version} com.squareup.retrofit2 converter-scalars ${converter-scalars.version} com.squareup.retrofit2 retrofit ${com.squareup.retrofit2.version} `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants