Java/ Jersey3.1.9 -without Maven, compiles fine, runs a bit, doesn't connect with bf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dunky
    Junior Member
    • Sep 2022
    • 14

    #1

    Java/ Jersey3.1.9 -without Maven, compiles fine, runs a bit, doesn't connect with bf

    Need a bit of help here chaps. Bit new to Eclipse and the Maven repository too! First hurdle this; the login. What could the matter be? I have the certificate, and uploaded it to betfair... no error messages, just freezes; waiting for a response from bf. Do I need to change settings in Eclipse? If I could get the most basic example to work I'd figure the rest out!

    JerseyClientBuilder jcBuilder = new JerseyClientBuilder();
    ClientBuilder cBuilder = jcBuilder.connectTimeout(timeout.getSeconds() * 1000, TimeUnit.SECONDS);
    Client client = cBuilder.build();
    WebTarget target = client.target(uri);
    Invocation invo = target.request("APPLICATION_JSON")
    .header("X-Application", appkey)
    .header("Content-Type", "application/x-www-form-urlencoded")
    .buildGet();

    ​//works up to this point
    Response resp = invo.invoke(Response.class);
Working...
X