How to set a timeout on resteasy client in JBoss EAP 7?
Issue
- Which code should be used in order to be able to configure timeout when sending rest (post or get) request? Is there any example for that?
- The proper way to set the timeout on Resteasy client with timeouts. We have an application running in JBoss EAP 7.1.0, and need to make a REST-based API call to another system. I am unable to find a way to set the
connect timeout
andread timeout
using this approach.
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
Client client = ClientBuilder.newBuilder().build();
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.