/** * Returns the text returned by the container after executing the passed * OpenSocialHttpRequest object. * * @param r OpenSocialHttpRequest object to execute * @return * @throws OpenSocialRequestException if the status code returned by the * container is not 200 OK. * @throws IOException */ private String getHttpResponse(OpenSocialHttpRequest r) { if (r != null) { int requestStatus = r.execute(); if (requestStatus == 200) { return(r.getResponseString()); } else { throw new OpenSocialRequestException( "Request returned error code: " + requestStatus); } } return(null); }
/** * Returns the text returned by the container after executing the passed * OpenSocialHttpRequest object. * * @param r OpenSocialHttpRequest object to execute * @return * @throws OpenSocialRequestException if the status code returned by the * container is not 200 OK. * @throws IOException */ private String getHttpResponse(OpenSocialHttpRequest r) { if (r != null) { int requestStatus = r.execute(); if (requestStatus == 200) { return r.getResponseString(); } else { throw new OpenSocialRequestException( "Request returned error code: " + requestStatus); } } return null; }