0

I am writing a script using java that send requests to two API's and in my code I am using many WebResource requests because I have to go back and forth between them fetching information.

WebResource sample = client.resource("http://" + keyName);

WebResource sample1 = client.resource("http://" + keyName);

WebResource sample3 = client.resource("http://" + keyName);

WebResource sample4 = client.resource("http://" + keyName);

How can I combine them?

jquerynoob
  • 663
  • 1
  • 7
  • 15
  • What exactly do you want to combine? Do you want to make a chain of requests? Like using the [get()](https://jersey.java.net/nonav/apidocs/1.4/jersey/com/sun/jersey/api/client/WebResource.html#get%28java.lang.Class%29) method on `sample` and then make another request with the result from the first call? – Anton Sarov Aug 06 '14 at 16:49
  • Yes, a chain of requests would be very helpful – jquerynoob Aug 06 '14 at 16:59

0 Answers0