code: InputStream getContent(String url) throws IOException, NsApiException {
          Request request = new Request.Builder().url(url).get().build();
          try {
              Response response = client.newCall(request).execute();
              if (response.body() == null) {
                  log.error("Error while calling the webservice, entity is null");
                  throw new NsApiException("Error while calling the webservice, entity is null");
              }
              return response.body().byteStream();
          }
          catch (RuntimeException e) {
              log.error("Error while calling the webservice, entity is null");
              throw new NsApiException("Error while calling the webservice, entity is null", e);
          }
      }
docs: Handling the webservice call
  
  @param url URL to call
  @return Input stream as a result, or an exception
  @throws IOException In case of an IO error
  @throws NsApiException In case of any other error