/** * Send a request message to the service provider and get the response. * * @return the response * @throws IOException * failed to communicate with the service provider * @throws OAuthProblemException * the HTTP response status code was not 200 (OK) */ public OAuthMessage invoke(OAuthMessage request, net.oauth.ParameterStyle style) throws IOException, OAuthException { OAuthResponseMessage response = access(request, style); if ((response.getHttpResponse().getStatusCode() / 100) != 2) { throw response.toOAuthProblemException(); } return response; }