Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have a need to integrate with a REST API. I tried using a tJavaFlex component and dumped some java in like:
OAuthConsumer consumer = new OAuthConsumer(null, context.consumerKey, null, null);
consumer.setProperty(RSA_SHA1.PRIVATE_KEY, context.privateKey);
consumer.setProperty(OAuth.OAUTH_SIGNATURE_METHOD, OAuth.RSA_SHA1);
OAuthAccessor accessor = new OAuthAccessor(consumer);
accessor.accessToken = context.consumerKey;
accessor.tokenSecret = context.consumerSecret;
OAuthClient client = new OAuthClient(new HttpClient3());
OAuthMessage response = client.invoke(accessor, OAuthMessage.GET, context.endpointUrl + "contacts", null);
... but that just gives me an input stream, It feels wrong to go calling JAXB to convert it into an XML document and map it to a bean.
Surely there's a better way ?