code: public <T> String postObject(
                      final String url,
                      final T object,
                      final Class<T> type
                      )
      {
          _LOG_.debug( "HTTP POST: URL=" + url
                          + ", request type=" + type );
  
          HttpHeaders  request_headers = new HttpHeaders();
          request_headers.setContentType( getObjectMediaType() );
          HttpEntity<T> request_entity = new HttpEntity<T>( object, request_headers );
  
          URI  location = null;
          try {
              location= _newRestTemplate().postForLocation( url, request_entity );
              //throws RestClientException
          } catch (Exception ex) {
              throw new HttpException( ex );
          }
  
          return location.toString();
      }
docs: HTTP POST
  
  @return
  the location, as an URI, where the resource is created.
  @throws  HttpException
  when an exceptional condition occurred during the HTTP method execution.