add support for posting an object based on whether or not it has an id