code: public <T extends NsResult> T getApiResponse(ApiRequest<T> request) throws NsApiException {
          try (InputStream stream = httpConnection
                  .getContent(NsApi.BASE_URL + request.getPath() + "?" + request.getRequestString())){
              @SuppressWarnings("unchecked")
              Handle<T> handle = (Handle<T>) handleMap.get(request.getClass());
              if (handle == null) {
                  throw new NsApiException("Unknown request type " + request.getClass());
              }
              return handle.getModel(stream);
          }
          catch (IOException e) {
              throw new NsApiException("IO Exception occurred", e);
          }
      }
docs: Method that makes a call to the NS. The request parameter defines what data to pull. The serialized data of the
  request is returned, or an exception is thrown. For all request types, see <a href="http://www.ns.nl/api/api">NS
  API</a> and {@link nl.pvanassen.ns.RequestBuilder}
  
  @see nl.pvanassen.ns.RequestBuilder
  @param request Data to request
  @param <T> Type of response
  @return Serialized response
  @throws NsApiException In case of any other error than a network error